<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Tekdaqc Firmware: ADS1256_Driver.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customstyle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Tekdaqc Firmware
   &#160;<span id="projectnumber">1.0.2.0</span>
   </div>
   <div id="projectbrief">The firmware of the Tekdaqc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_a_d_s1256___driver_8c_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ADS1256_Driver.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_a_d_s1256___driver_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright 2013 Tenkiv, Inc.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * specific language governing permissions and limitations under the License.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">/* INCLUDES */</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_tekdaqc___debug_8h.html">Tekdaqc_Debug.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_a_d_s1256___driver_8h.html">ADS1256_Driver.h</a>&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_tekdaqc__config_8h.html">Tekdaqc_Config.h</a>&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_tekdaqc___timers_8h.html">Tekdaqc_Timers.h</a>&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#ifdef PRINTF_OUTPUT</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">/* PRIVATE DEFINES */</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="_a_d_s1256___driver_8c.html#a04429776ba95839668cd3af623650e87">   51</a></span>&#160;<span class="preprocessor">#define ADS1256_NEGATIVE_FLAG ((uint32_t) 0x00800000U)</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="_a_d_s1256___driver_8c.html#ab81fe3f8a82390e44e042f351df3f59c">   58</a></span>&#160;<span class="preprocessor">#define ADS1256_NEGATIVE_PADDING ((uint32_t) 0xFF000000U)</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor">#define ADS1256_BUFFER_OFF_STR      &quot;OFF&quot;</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="_a_d_s1256___driver_8c.html#a09f71f7cdf36c3dee470ee38edc8431e">   72</a></span>&#160;<span class="preprocessor">#define ADS1256_REGISTERS_DEBUG_FORMATTER &quot;[ADS1256] Register %2d %6s: 0x%02X\n\r&quot;</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="_a_d_s1256___driver_8c.html#aaa23b199dae1b52d4b78b56328e5509b">   79</a></span>&#160;<span class="preprocessor">#define ADS1256_REGISTERS_TOSTRING_HEADER &quot;[ADS1256] Register Contents:\n\r&quot;</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment">/* PRIVATE VARIABLES */</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="comment">/* Device ID. */</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="keyword">static</span> uint8_t ID = (uint8_t) 0xFFU;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="comment">/* TODO: These need to be updated every time they are written out to the ADC */</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="comment">/* Data Order. */</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#ga3615e2e1ba70971dcdd5f7e54ffe5606">ADS1256_ORDER_t</a> ORDER = <a class="code" href="group__ads1256__driver.html#gga3615e2e1ba70971dcdd5f7e54ffe5606ad87274f158f6a5534bb84cb4c75ac3e7">ADS1256_MSB_FIRST</a>;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="comment">/* Auto-Calibration. */</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#ga17864ca559c443a262068f0d19406113">ADS1256_ACAL_t</a> ACAL = <a class="code" href="group__ads1256__driver.html#gga17864ca559c443a262068f0d19406113a1d47eab8dbc92c3879643572738ab3fb">ADS1256_ACAL_DISABLED</a>;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="comment">/* Analog Buffer. */</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#ga12f71f8fc93fe63fb3c855ddd2070890">ADS1256_BUFFER_t</a> BUFFER = <a class="code" href="group__ads1256__driver.html#gga12f71f8fc93fe63fb3c855ddd2070890ab96fff9524e97e03826453e744f85e92">ADS1256_BUFFER_DISABLED</a>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="comment">/* Analog inputs. */</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#ga7eac069c538033668b7baeca198def8f">ADS1256_AIN_t</a> AIN_POS = <a class="code" href="group__ads1256__driver.html#gga7eac069c538033668b7baeca198def8fa47239a420bad562940da8a369ba7ef02">ADS1256_AIN0</a>;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#ga7eac069c538033668b7baeca198def8f">ADS1256_AIN_t</a> AIN_NEG = <a class="code" href="group__ads1256__driver.html#gga7eac069c538033668b7baeca198def8fa20686f8f3555bdf3074706ea7a0dbf56">ADS1256_AIN1</a>;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="comment">/* ADC Clock out setting. */</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#ga2d683909a58aa0617ee7c5d06d0a489f">ADS1256_CLOCK_OUT_t</a> CLOCK_OUT = <a class="code" href="group__ads1256__driver.html#gga2d683909a58aa0617ee7c5d06d0a489fa916ced2e355d66e2d3a92b8c2a0b7ec0">ADS1256_CLOCK_OUT_OFF</a>;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="comment">/* ADC Sensor detect current output. */</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#gaa3102e98865ba4e72463676779cd62d4">ADS1256_SENSOR_DETECT_t</a> SENSOR_CURRENT = <a class="code" href="group__ads1256__driver.html#ggaa3102e98865ba4e72463676779cd62d4a916890dc39cbdbb4bc7eb2b83df10810">ADS1256_SD_OFF</a>;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="comment">/* Programmable gain amplifier setting. */</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#gace2e231df7cd3598eb26d5ff51171701">ADS1256_PGA_t</a> PGA = <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">/* Samples per second setting. */</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#gab0437f81aad031aadf3e05dd5fe0a731">ADS1256_SPS_t</a> SPS = <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a>;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="comment">/* GPIO Port Directions. */</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#ga4df06f2662792cc9eff4ac7f97e35026">ADS1256_GPIO_DIRECTION_t</a> GPIO_DIRECTIONS[] = { <a class="code" href="group__ads1256__driver.html#gga4df06f2662792cc9eff4ac7f97e35026aeb27500675e6a6c77bf127853092a6e7">ADS1256_GPIO_OUTPUT</a>,</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <a class="code" href="group__ads1256__driver.html#gga4df06f2662792cc9eff4ac7f97e35026afeaaf398ab13211be0864d1532282e51">ADS1256_GPIO_INPUT</a>, <a class="code" href="group__ads1256__driver.html#gga4df06f2662792cc9eff4ac7f97e35026afeaaf398ab13211be0864d1532282e51">ADS1256_GPIO_INPUT</a>, ADS1256_GPIO_INPUT };</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="comment">/* GPIO Port Status. */</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="keyword">static</span> <a class="code" href="group__ads1256__driver.html#ga587084017ba4b239ffb8d90376921c2c">ADS1256_GPIO_STATUS_t</a> GPIO_STATUS[] = { <a class="code" href="group__ads1256__driver.html#gga587084017ba4b239ffb8d90376921c2caa73adb23173490c355e1f42cc097b62e">ADS1256_GPIO_LOW</a>,</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <a class="code" href="group__ads1256__driver.html#gga587084017ba4b239ffb8d90376921c2caa73adb23173490c355e1f42cc097b62e">ADS1256_GPIO_LOW</a>, <a class="code" href="group__ads1256__driver.html#gga587084017ba4b239ffb8d90376921c2caa73adb23173490c355e1f42cc097b62e">ADS1256_GPIO_LOW</a>, ADS1256_GPIO_LOW };</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="comment">/* Flag to indicate if command or pin should be used for SYNC of ADC. */</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keyword">static</span> <span class="keywordtype">bool</span> SYNC_USE_COMMAND = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="comment">/* The last retrieved measurement from the ADC. */</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="keyword">static</span> uint32_t ADS1256_Measurement = 0U;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="comment">/* The last retrieved state of the ADC register. */</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword">static</span> uint8_t ADS1256_Registers[11]; <span class="comment">/* A local copy of all the ADC registers. Note that the indexing here only works because the addresses start at 0 and count up. */</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="comment">/* Flag for if we should always read the register from the ADS1256 for most up to date values. */</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="keyword">static</span> <span class="keywordtype">bool</span> ADS1256_AlwaysReadReg = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="comment">/* Scratch string used for various string print operations. */</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="keyword">static</span> <span class="keywordtype">char</span> SCRATCH_STR[150];</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="comment">/* PRIVATE FUNCTION PROTOTYPES */</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* ADS1256_StringFromRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="comment">/* COMMAND METHODS */</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_Reg_Command(<a class="code" href="group__ads1256__driver.html#gadb203fb3b246881a33160b5b25822d42">ADS1256_Command_t</a> cmd, <a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t count);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#gadb203fb3b246881a33160b5b25822d42">ADS1256_Command_t</a> cmd);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="comment">/* REGISTER METHODS */</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="keyword">static</span> uint8_t ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t index, uint8_t count);</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t index, uint8_t count, uint8_t value);</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="keyword">static</span> uint8_t ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_SetRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t value);</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_SetRegisters(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t count, uint8_t* values);</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg);</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_ReadRegisters(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t count);</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_WriteRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg);</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_WriteRegisters(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t count);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="comment">/* PUBLIC METHODS */</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="comment">/* INITIALIZATION METHODS */</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;</div>
<div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga817dc23392ce56ae255cb3238d796b60">  241</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga817dc23392ce56ae255cb3238d796b60">ADS1256_Init</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <a class="code" href="group__ads1256__driver.html#gaf09ce69ea32ea967d008d0a465929820">ADS1256_SPI_Init</a>(); <span class="comment">/* Initialize the SPI lines */</span></div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <a class="code" href="group__ads1256__driver.html#gac1a6ea86db094b51ec478098738353b4">ADS1256_StatePins_Init</a>(); <span class="comment">/* Initialize the control pins */</span></div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga7b012a2ab6b0494da4e1297e34ab9925">ADS1256_Full_Reset</a>(); <span class="comment">/* Perform a full reset on the ADC */</span></div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    ADS1256_ReadRegisters(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea6f3879237c79faf51383e8a52dbecd58">ADS1256_NREGS</a>); <span class="comment">/* Read out all the registers */</span></div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a>(<span class="keyword">true</span>); <span class="comment">/* SYNC the ADC so it isn&#39;t free running by sending the SPI command */</span></div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;<span class="preprocessor"></span>    <a class="code" href="group__ads1256__driver.html#ga9642423b95878836291bbf57102e92a6">ADS1256_PrintRegs</a>(); <span class="comment">/* Print out the registers */</span></div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;<span class="preprocessor"></span>}</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div>
<div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gac1a6ea86db094b51ec478098738353b4">  255</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#gac1a6ea86db094b51ec478098738353b4">ADS1256_StatePins_Init</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    GPIO_InitTypeDef GPIO_InitStructure; <span class="comment">/* Structure used to initialize the GPIO pins */</span></div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;    <span class="comment">/* Confgure the DRDY Pin */</span></div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    <span class="comment">/* Enable the GPIO Clock */</span></div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    RCC_AHB1PeriphClockCmd(ADS1256_DRDY_GPIO_CLK, ENABLE);</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    <span class="comment">/* Configure the GPIO pin */</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    GPIO_InitStructure.GPIO_Pin = ADS1256_DRDY_PIN;</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    GPIO_Init(ADS1256_DRDY_GPIO_PORT, &amp;GPIO_InitStructure);</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    <span class="comment">/* Confgure the SYNC Pin */</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    <span class="comment">/* Enable the GPIO Clock */</span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    RCC_AHB1PeriphClockCmd(ADS1256_SYNC_GPIO_CLK, ENABLE);</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    <span class="comment">/* Configure the GPIO pin */</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    GPIO_InitStructure.GPIO_Pin = ADS1256_SYNC_PIN;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    GPIO_Init(ADS1256_SYNC_GPIO_PORT, &amp;GPIO_InitStructure);</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    <span class="comment">/* Bring the SYNC pin high */</span></div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    GPIO_SetBits(ADS1256_SYNC_GPIO_PORT, ADS1256_SYNC_PIN);</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    <span class="comment">/* Confgure the RESET Pin */</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="comment">/* Enable the GPIO Clock */</span></div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    RCC_AHB1PeriphClockCmd(ADS1256_RESET_GPIO_CLK, ENABLE);</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    <span class="comment">/* Configure the GPIO pin */</span></div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    GPIO_InitStructure.GPIO_Pin = ADS1256_RESET_PIN;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    GPIO_Init(ADS1256_RESET_GPIO_PORT, &amp;GPIO_InitStructure);</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    <span class="comment">/* Bring the RESET pin high */</span></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    GPIO_SetBits(ADS1256_RESET_GPIO_PORT, ADS1256_RESET_PIN);</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;}</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;<span class="comment">/* STRING METHODS */</span></div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* ADS1256_StringFromRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg) {</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* strings[] = { <span class="stringliteral">&quot;STATUS&quot;</span>, <span class="stringliteral">&quot;MUX&quot;</span>, <span class="stringliteral">&quot;ADCON&quot;</span>, <span class="stringliteral">&quot;DRATE&quot;</span>, <span class="stringliteral">&quot;IO&quot;</span>,</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;            <span class="stringliteral">&quot;OFC0&quot;</span>, <span class="stringliteral">&quot;OFC1&quot;</span>, <span class="stringliteral">&quot;OFC2&quot;</span>, <span class="stringliteral">&quot;FSC0&quot;</span>, <span class="stringliteral">&quot;FSC1&quot;</span>, <span class="stringliteral">&quot;FSC2&quot;</span> };</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    <span class="keywordflow">return</span> strings[reg];</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;}</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;</div>
<div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga9642423b95878836291bbf57102e92a6">  324</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga9642423b95878836291bbf57102e92a6">ADS1256_PrintRegs</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    ADS1256_ReadRegisters(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea6f3879237c79faf51383e8a52dbecd58">ADS1256_NREGS</a>); <span class="comment">/* Read out all the registers */</span></div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    <span class="keywordflow">for</span> (uint_fast8_t i = 0; i &lt; <a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea6f3879237c79faf51383e8a52dbecd58">ADS1256_NREGS</a>; ++i) {</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;        printf(<a class="code" href="_a_d_s1256___driver_8c.html#a09f71f7cdf36c3dee470ee38edc8431e">ADS1256_REGISTERS_DEBUG_FORMATTER</a>, i, ADS1256_StringFromRegister(i), ADS1256_Registers[i]);</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    }</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;}</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;</div>
<div class="line"><a name="l00338"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gacbbff85197a622b07cfb2bf47b57c29b">  338</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#gacbbff85197a622b07cfb2bf47b57c29b">ADS1256_RegistersToString</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    ADS1256_ReadRegisters(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea6f3879237c79faf51383e8a52dbecd58">ADS1256_NREGS</a>); <span class="comment">/* Read out all the registers */</span></div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;<span class="preprocessor"></span>    <a class="code" href="group__ads1256__driver.html#ga9642423b95878836291bbf57102e92a6">ADS1256_PrintRegs</a>(); <span class="comment">/* If we are debugging this module, print to stdout as well. */</span></div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<span class="preprocessor"></span>    strncat(TOSTRING_BUFFER, <a class="code" href="_a_d_s1256___driver_8c.html#aaa23b199dae1b52d4b78b56328e5509b">ADS1256_REGISTERS_TOSTRING_HEADER</a>, SIZE_TOSTRING_BUFFER); <span class="comment">/* Append the header first */</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    uint8_t n = 0;</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    <span class="keywordflow">for</span> (uint_fast8_t i = 0U; i &lt; <a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea6f3879237c79faf51383e8a52dbecd58">ADS1256_NREGS</a>; ++i) { <span class="comment">/* For each register */</span></div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;        <span class="comment">/* Print the register string to the scratch string, with overflow safety. This will truncate the string if necessary. */</span></div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;        n = snprintf(SCRATCH_STR, <span class="keyword">sizeof</span>(SCRATCH_STR), <a class="code" href="_a_d_s1256___driver_8c.html#a09f71f7cdf36c3dee470ee38edc8431e">ADS1256_REGISTERS_DEBUG_FORMATTER</a>, i, ADS1256_StringFromRegister(i), ADS1256_Registers[i]);</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;        <span class="keywordflow">if</span> (n &gt; 0) { <span class="comment">/* Writing was successful */</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;            <span class="comment">/* Append the scratch string to the output string */</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;            strncat(TOSTRING_BUFFER, SCRATCH_STR, (SIZE_TOSTRING_BUFFER - strlen(TOSTRING_BUFFER) - 1U)); <span class="comment">/* Reserve one for the terminating NULL */</span></div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;            <span class="comment">/* We failed to write anything to the string */</span></div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;<span class="preprocessor"></span>            printf(<span class="stringliteral">&quot;[ADS1256] Failed to write register %s to the output string.\n\r&quot;</span>, ADS1256_StringFromRegister(i));</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;<span class="preprocessor"></span>        }</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;    }</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;}</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;</div>
<div class="line"><a name="l00366"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gabfd8ef639770cdb94388e1b63da1b0ba">  366</a></span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__ads1256__driver.html#gabfd8ef639770cdb94388e1b63da1b0ba">ADS1256_StringFromSPS</a>(<a class="code" href="group__ads1256__driver.html#gab0437f81aad031aadf3e05dd5fe0a731">ADS1256_SPS_t</a> sps) {</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* strings[] = { <span class="stringliteral">&quot;30,000&quot;</span>, <span class="stringliteral">&quot;15,000&quot;</span>, <span class="stringliteral">&quot;7,500&quot;</span>, <span class="stringliteral">&quot;3,750&quot;</span>,</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;            <span class="stringliteral">&quot;2,000&quot;</span>, <span class="stringliteral">&quot;1,000&quot;</span>, <span class="stringliteral">&quot;500&quot;</span>, <span class="stringliteral">&quot;100&quot;</span>, <span class="stringliteral">&quot;60&quot;</span>, <span class="stringliteral">&quot;50&quot;</span>, <span class="stringliteral">&quot;30&quot;</span>, <span class="stringliteral">&quot;25&quot;</span>, <span class="stringliteral">&quot;15&quot;</span>, <span class="stringliteral">&quot;10&quot;</span>,</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;            <span class="stringliteral">&quot;5&quot;</span>, <span class="stringliteral">&quot;2.5&quot;</span>, <span class="stringliteral">&quot;INVALID&quot;</span> };</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    <span class="keywordflow">switch</span> (sps) {</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a>:</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        <span class="keywordflow">return</span> strings[0];</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af955d6f41a97fe05c19e33875b9f8179">ADS1256_SPS_15000</a>:</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;        <span class="keywordflow">return</span> strings[1];</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a04ee81dece7d46e4d4db5ed37f358b0d">ADS1256_SPS_7500</a>:</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;        <span class="keywordflow">return</span> strings[2];</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ac08e0021f65ebc828e467da3713964ed">ADS1256_SPS_3750</a>:</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        <span class="keywordflow">return</span> strings[3];</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af12dc4b35be49d560742916582e6176c">ADS1256_SPS_2000</a>:</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;        <span class="keywordflow">return</span> strings[4];</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a12d8d1323c2628fe27a17765b06d0af0">ADS1256_SPS_1000</a>:</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        <span class="keywordflow">return</span> strings[5];</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ae658af6aeb6976e4333295abe9cd2bfe">ADS1256_SPS_500</a>:</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;        <span class="keywordflow">return</span> strings[6];</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a610b2d5c532647c47eccfae4f38180c9">ADS1256_SPS_100</a>:</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        <span class="keywordflow">return</span> strings[7];</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a7a94d4abfbc3f888640cc1301bba481c">ADS1256_SPS_60</a>:</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;        <span class="keywordflow">return</span> strings[8];</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a5146cfab8c3f5a4229a192d7f6c75fee">ADS1256_SPS_50</a>:</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        <span class="keywordflow">return</span> strings[9];</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af00f11dbdf6bc388f20b6ee3b6e4bec3">ADS1256_SPS_30</a>:</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        <span class="keywordflow">return</span> strings[10];</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a0f9109a1a40838123ccd55e1af90a3e6">ADS1256_SPS_25</a>:</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        <span class="keywordflow">return</span> strings[11];</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731acebddb9fec5c26050c0f10760593c7b8">ADS1256_SPS_15</a>:</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;        <span class="keywordflow">return</span> strings[12];</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a968c2e2d2088b56c7983ea25d88ab095">ADS1256_SPS_10</a>:</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;        <span class="keywordflow">return</span> strings[13];</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a60cbd1927b566eafda96104ece8d7e70">ADS1256_SPS_5</a>:</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;        <span class="keywordflow">return</span> strings[14];</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731adac392298502254c3d10c687fa20e230">ADS1256_SPS_2_5</a>:</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        <span class="keywordflow">return</span> strings[15];</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        <span class="keywordflow">return</span> strings[0];</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    }</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;}</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;</div>
<div class="line"><a name="l00414"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga59c2fb71d5fac95ab30f4c66c0e4a9e2">  414</a></span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__ads1256__driver.html#ga59c2fb71d5fac95ab30f4c66c0e4a9e2">ADS1256_StringFromPGA</a>(<a class="code" href="group__ads1256__driver.html#gace2e231df7cd3598eb26d5ff51171701">ADS1256_PGA_t</a> pga) {</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* strings[] = { <span class="stringliteral">&quot;x1&quot;</span>, <span class="stringliteral">&quot;x2&quot;</span>, <span class="stringliteral">&quot;x4&quot;</span>, <span class="stringliteral">&quot;x8&quot;</span>, <span class="stringliteral">&quot;x16&quot;</span>, <span class="stringliteral">&quot;x32&quot;</span>, <span class="stringliteral">&quot;x64&quot;</span>, <span class="stringliteral">&quot;INVALID&quot;</span> };</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;    <span class="keywordflow">switch</span> (pga) {</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>:</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        <span class="keywordflow">return</span> strings[0];</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a>:</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;        <span class="keywordflow">return</span> strings[1];</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a>:</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;        <span class="keywordflow">return</span> strings[2];</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a>:</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;        <span class="keywordflow">return</span> strings[3];</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a>:</div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;        <span class="keywordflow">return</span> strings[4];</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a>:</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;        <span class="keywordflow">return</span> strings[5];</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a>:</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;        <span class="keywordflow">return</span> strings[6];</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;        <span class="keywordflow">return</span> strings[7];</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;    }</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;}</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;</div>
<div class="line"><a name="l00442"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gafab91604ac5588b9c626bb7e050f0774">  442</a></span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__ads1256__driver.html#gafab91604ac5588b9c626bb7e050f0774">ADS1256_StringFromBuffer</a>(<a class="code" href="group__ads1256__driver.html#ga12f71f8fc93fe63fb3c855ddd2070890">ADS1256_BUFFER_t</a> buffer) {</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* strings[] = { <span class="stringliteral">&quot;DISABLED&quot;</span>, <span class="stringliteral">&quot;ENABLED&quot;</span>, <span class="stringliteral">&quot;INVALID&quot;</span> };</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;    <span class="keywordflow">switch</span> (buffer) {</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#gga12f71f8fc93fe63fb3c855ddd2070890ab96fff9524e97e03826453e744f85e92">ADS1256_BUFFER_DISABLED</a>:</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;        <span class="keywordflow">return</span> strings[0];</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#gga12f71f8fc93fe63fb3c855ddd2070890a5e401084d351163377c60d8e4e2a50c1">ADS1256_BUFFER_ENABLED</a>:</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;        <span class="keywordflow">return</span> strings[1];</div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;        <span class="keywordflow">return</span> strings[2];</div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;    }</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;}</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;</div>
<div class="line"><a name="l00460"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gac39cc4f0a18e9f7ce3f915d5b5050d94">  460</a></span>&#160;<a class="code" href="group__ads1256__driver.html#ga12f71f8fc93fe63fb3c855ddd2070890">ADS1256_BUFFER_t</a> <a class="code" href="group__ads1256__driver.html#gac39cc4f0a18e9f7ce3f915d5b5050d94">ADS1256_StringToBuffer</a>(<span class="keywordtype">char</span>* str) {</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;    <span class="keywordflow">if</span> (strcmp(str, ADS1256_BUFFER_OFF_STR) == 0) {</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#gga12f71f8fc93fe63fb3c855ddd2070890ab96fff9524e97e03826453e744f85e92">ADS1256_BUFFER_DISABLED</a>;</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#gga12f71f8fc93fe63fb3c855ddd2070890a5e401084d351163377c60d8e4e2a50c1">ADS1256_BUFFER_ENABLED</a>;</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;    }</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;}</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;</div>
<div class="line"><a name="l00474"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gae2f1be4b151cfc9dfeede38a79764dff">  474</a></span>&#160;<a class="code" href="group__ads1256__driver.html#gab0437f81aad031aadf3e05dd5fe0a731">ADS1256_SPS_t</a> <a class="code" href="group__ads1256__driver.html#gae2f1be4b151cfc9dfeede38a79764dff">ADS1256_StringToDataRate</a>(<span class="keywordtype">char</span>* str) {</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;    int_least16_t i = (int_least16_t) strtol(str, NULL, 10);</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    <span class="keywordflow">switch</span> (i) {</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    <span class="keywordflow">case</span> 30000:</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a>;</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;    <span class="keywordflow">case</span> 15000:</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af955d6f41a97fe05c19e33875b9f8179">ADS1256_SPS_15000</a>;</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    <span class="keywordflow">case</span> 7500:</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a04ee81dece7d46e4d4db5ed37f358b0d">ADS1256_SPS_7500</a>;</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;    <span class="keywordflow">case</span> 3750:</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ac08e0021f65ebc828e467da3713964ed">ADS1256_SPS_3750</a>;</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;    <span class="keywordflow">case</span> 2000:</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af12dc4b35be49d560742916582e6176c">ADS1256_SPS_2000</a>;</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;    <span class="keywordflow">case</span> 1000:</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a12d8d1323c2628fe27a17765b06d0af0">ADS1256_SPS_1000</a>;</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;    <span class="keywordflow">case</span> 500:</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ae658af6aeb6976e4333295abe9cd2bfe">ADS1256_SPS_500</a>;</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;    <span class="keywordflow">case</span> 100:</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a610b2d5c532647c47eccfae4f38180c9">ADS1256_SPS_100</a>;</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    <span class="keywordflow">case</span> 60:</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a7a94d4abfbc3f888640cc1301bba481c">ADS1256_SPS_60</a>;</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    <span class="keywordflow">case</span> 50:</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a5146cfab8c3f5a4229a192d7f6c75fee">ADS1256_SPS_50</a>;</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    <span class="keywordflow">case</span> 30:</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af00f11dbdf6bc388f20b6ee3b6e4bec3">ADS1256_SPS_30</a>;</div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;    <span class="keywordflow">case</span> 25:</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a0f9109a1a40838123ccd55e1af90a3e6">ADS1256_SPS_25</a>;</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    <span class="keywordflow">case</span> 15:</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731acebddb9fec5c26050c0f10760593c7b8">ADS1256_SPS_15</a>;</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;    <span class="keywordflow">case</span> 10:</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a968c2e2d2088b56c7983ea25d88ab095">ADS1256_SPS_10</a>;</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;    <span class="keywordflow">case</span> 5:</div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a60cbd1927b566eafda96104ece8d7e70">ADS1256_SPS_5</a>;</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;    <span class="keywordflow">case</span> 2:</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731adac392298502254c3d10c687fa20e230">ADS1256_SPS_2_5</a>;</div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;        printf(<span class="stringliteral">&quot;[ERROR] ADS1256_StringToDataRate(char* str): Invalid parameter (%s), providing 30000 SPS.\n\r&quot;</span>, str);</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a>;</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;    }</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;}</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;</div>
<div class="line"><a name="l00521"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga04cf21f06b462886045c4075782fdf13">  521</a></span>&#160;<a class="code" href="group__ads1256__driver.html#gace2e231df7cd3598eb26d5ff51171701">ADS1256_PGA_t</a> <a class="code" href="group__ads1256__driver.html#ga04cf21f06b462886045c4075782fdf13">ADS1256_StringToPGA</a>(<span class="keywordtype">char</span>* str) {</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;    int_least16_t i = (int_least16_t) strtol(str, NULL, 10);</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;    <span class="keywordflow">switch</span> (i) {</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;    <span class="keywordflow">case</span> 1:</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>;</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;    <span class="keywordflow">case</span> 2:</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a>;</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;    <span class="keywordflow">case</span> 4:</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a>;</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;    <span class="keywordflow">case</span> 8:</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a>;</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;    <span class="keywordflow">case</span> 16:</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a>;</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;    <span class="keywordflow">case</span> 32:</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a>;</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;    <span class="keywordflow">case</span> 64:</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a>;</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;        printf(<span class="stringliteral">&quot;[ERROR] ADS1256_StringToPGA(char* str): Invalid parameter (%s), providing x1.\n\r&quot;</span>, str);</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>;</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;    }</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;}</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;</div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;<span class="comment">/* RESET METHODS */</span></div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00557"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga7b012a2ab6b0494da4e1297e34ab9925">  557</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga7b012a2ab6b0494da4e1297e34ab9925">ADS1256_Full_Reset</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga4664ba6707817673019016b0b0d6668e">ADS1256_Reset_By_Pin</a>(); <span class="comment">/* Reset the ADC */</span></div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga5fb186f2113df3c976ae00debb6095d7">ADS1256_Reset_SPI</a>(); <span class="comment">/* Reset the SPI line */</span></div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a>(<span class="keyword">true</span>); <span class="comment">/* SYNC the ADC via SPI */</span></div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;}</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;</div>
<div class="line"><a name="l00571"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gafdd4555dcde566f72adf2d9d51f4a883">  571</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#gafdd4555dcde566f72adf2d9d51f4a883">ADS1256_Reset_By_Command</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;    ID = 0xFFU; <span class="comment">/* Reset the stored ID so we can properly identify the ADC after reset */</span></div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;    ADS1256_CS_LOW(); <span class="comment">/* Enable SPI communication */</span></div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;    ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a5d52692a6ccf9bb846ba1844057243c7">ADS1256_RESET</a>); <span class="comment">/* Send the reset command */</span></div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga0c9c039ac03ad1280102b1f05c056071">ADS1256_CS_HIGH</a>(); <span class="comment">/* Latch the SPI communication */</span></div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga458c5bdb28d0e87e28cdaa9cfcd5f429">ADS1256_WaitUntilDataReady</a>(<span class="keyword">false</span>); <span class="comment">/* Wait until the ADC reports that data is ready via the DRDY pin. */</span></div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;}</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;</div>
<div class="line"><a name="l00586"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga1c25b603705f67cccde59e406b1c4c07">  586</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga1c25b603705f67cccde59e406b1c4c07">ADS1256_Reset_By_Clock</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;    ID = 0xFFU; <span class="comment">/* Reset the stored ID so we can properly identify the ADC after reset. */</span></div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga3a68db63bde582e77d1cad0e86e07922">ADS1256_CLK_To_GPIO</a>(); <span class="comment">/* Change the clock line from SPI mode to GPIO mode */</span></div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga525f292542208f8309ee79c912b77334">ADS1256_SCLK_LOW</a>(); <span class="comment">/* Start the clock reset sequence. */</span></div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>(10U); <span class="comment">/* Start low */</span></div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga13b51a0fb626ff6f592fc7ce425e8046">ADS1256_SCLK_HIGH</a>(); <span class="comment">/* First high pulse */</span></div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>((uint64_t) (300U * ADS1256_CLK_PERIOD_US)); <span class="comment">/* Timing characteristic t12, tuned because of timing errors */</span></div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga525f292542208f8309ee79c912b77334">ADS1256_SCLK_LOW</a>(); <span class="comment">/* First low pulse */</span></div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>((uint64_t) (5U * ADS1256_CLK_PERIOD_US)); <span class="comment">/* Timing characteristic t13 */</span></div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga13b51a0fb626ff6f592fc7ce425e8046">ADS1256_SCLK_HIGH</a>(); <span class="comment">/* Second high pulse */</span></div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>((uint64_t) (550U * ADS1256_CLK_PERIOD_US)); <span class="comment">/* Timing characteristic t14, tuned because of timing errors */</span></div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga525f292542208f8309ee79c912b77334">ADS1256_SCLK_LOW</a>(); <span class="comment">/* Second low pulse */</span></div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>((uint64_t) (5U * ADS1256_CLK_PERIOD_US)); <span class="comment">/* Timing characteristic t13 */</span></div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga13b51a0fb626ff6f592fc7ce425e8046">ADS1256_SCLK_HIGH</a>(); <span class="comment">/* Third high pulse */</span></div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>((uint64_t) (1050U * ADS1256_CLK_PERIOD_US)); <span class="comment">/* Timing characteristic t15, tuned because of timing errors */</span></div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga525f292542208f8309ee79c912b77334">ADS1256_SCLK_LOW</a>(); <span class="comment">/* End the clock reset sequence. */</span></div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga631498cd1b9e0302c8ceec6ad3094e03">ADS1256_GPIO_To_CLK</a>(); <span class="comment">/* Return the clock line to SPI mode. */</span></div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;}</div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;</div>
<div class="line"><a name="l00614"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga4664ba6707817673019016b0b0d6668e">  614</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga4664ba6707817673019016b0b0d6668e">ADS1256_Reset_By_Pin</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;    GPIO_ResetBits(ADS1256_RESET_GPIO_PORT, ADS1256_RESET_PIN);</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#gaf7d18dc0155f873c4ed1d149e6060d19">Delay_ms</a>(0.0006f); <span class="comment">/* Timing characteristic t16 */</span></div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;    GPIO_SetBits(ADS1256_RESET_GPIO_PORT, ADS1256_RESET_PIN);</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;}</div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;</div>
<div class="line"><a name="l00628"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga5fb186f2113df3c976ae00debb6095d7">  628</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga5fb186f2113df3c976ae00debb6095d7">ADS1256_Reset_SPI</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga525f292542208f8309ee79c912b77334">ADS1256_SCLK_LOW</a>();</div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;    <span class="comment">/* Delay for at least 32 /DRDY periods */</span></div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;    <span class="comment">/* For simplicity, we will simply delay for 0.5 seconds */</span></div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;    <span class="keywordflow">for</span> (uint_fast8_t i = 0U; i &lt; 32U; ++i) {</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;        <a class="code" href="group__tekdaqc__timers.html#gaf7d18dc0155f873c4ed1d149e6060d19">Delay_ms</a>(<a class="code" href="group__ads1256__driver.html#ga5cb8add9c1b77b2cf87be526d6363d1c">ADS1256_GetSettlingTime</a>());</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;    }</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;}</div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;</div>
<div class="line"><a name="l00644"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga16dbb214bb63f6051170ee4f8964beb6">  644</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga16dbb214bb63f6051170ee4f8964beb6">ADS1256_ResetAndReprogram</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga7b012a2ab6b0494da4e1297e34ab9925">ADS1256_Full_Reset</a>(); <span class="comment">/* Perform the full reset */</span></div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;    ADS1256_ReadRegisters(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea6f3879237c79faf51383e8a52dbecd58">ADS1256_NREGS</a>); <span class="comment">/* Read out al registers */</span></div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;    <span class="comment">/* Set PGA and data rate first, then calibrate */</span></div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga0d74a1bb54e74bd1ef8af302471d3905">ADS1256_SetInputBufferSetting</a>(BUFFER);</div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga14de02499be3d1dae8497b4e048b9568">ADS1256_SetDataRate</a>(SPS);</div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;    <a class="code" href="group__ads1256__driver.html#gabd0d17a03fdddefb2d8cf04ad304a49d">ADS1256_SetPGASetting</a>(PGA);</div>
<div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga72de73cf9585121dd65895c6addf16ff">ADS1256_CalibrateSelf</a>();</div>
<div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;</div>
<div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;    <span class="comment">/* Now set other stuff */</span></div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga2bf7d5627d8645de8b27842a006653bd">ADS1256_SetInputChannels</a>(AIN_POS, AIN_NEG);</div>
<div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga7dbd4e23a723295a60adc8a7a97b9c5a">ADS1256_SetAutoCalSetting</a>(ACAL);</div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga4131f935614bc1ea9eff4f0ec8b1cdfb">ADS1256_SetDataOutputBitOrder</a>(ORDER);</div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga8354e6ff9be09b89afcac3c5fcbd3083">ADS1256_SetClockOutRate</a>(CLOCK_OUT);</div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;    <a class="code" href="group__ads1256__driver.html#gae179dd8d2feace96c296cdff466225dc">ADS1256_SetSensorDetectCurrent</a>(SENSOR_CURRENT);</div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;</div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;    <span class="comment">/* GPIO Stuff */</span></div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;    <span class="keywordflow">for</span> (uint_fast8_t i = 0U; i &lt; 4U; ++i) {</div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;        <a class="code" href="group__ads1256__driver.html#gacea1f1adb429508088a4a32029f90d00">ADS1256_SetGPIODirection</a>(i, GPIO_DIRECTIONS[i]);</div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;        <span class="keywordflow">if</span> (GPIO_DIRECTIONS[i] == <a class="code" href="group__ads1256__driver.html#gga4df06f2662792cc9eff4ac7f97e35026aeb27500675e6a6c77bf127853092a6e7">ADS1256_GPIO_OUTPUT</a>) {</div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;            <a class="code" href="group__ads1256__driver.html#ga3285b54e967fbb817f071f9a1c455920">ADS1256_SetGPIOStatus</a>(i, GPIO_STATUS[i]);</div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;        }</div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;    }</div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;}</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;</div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;</div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;<span class="comment">/* AQUISITION METHODS */</span></div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;</div>
<div class="line"><a name="l00682"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga7dee6663af668f862c4bca7c56d80f5e">  682</a></span>&#160;int32_t <a class="code" href="group__ads1256__driver.html#ga7dee6663af668f862c4bca7c56d80f5e">ADS1256_GetMeasurement</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;    <span class="comment">/*  Retrieve data */</span></div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;    uint8_t raw_data[3];</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga91d8582f9d5cb52b54fb801644e05e21">ADS1256_ReadData</a>(raw_data);</div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;    <span class="comment">/*  Send the ADC into SYNC mode via command */</span></div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a>(<span class="keyword">true</span>);</div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;</div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;    <span class="comment">/*  Combine the 3 bytes into one unsigned int */</span></div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;    ADS1256_Measurement = raw_data[0] &lt;&lt; 16U;</div>
<div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;    ADS1256_Measurement |= raw_data[1] &lt;&lt; 8U;</div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;    ADS1256_Measurement |= raw_data[2];</div>
<div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="group__ads1256__driver.html#gad8605a86bb12367efea3074b97dfa529">ADS1256_ConvertRawValue</a>(ADS1256_Measurement);</div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;}</div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;</div>
<div class="line"><a name="l00703"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gaa44ba74c5036ac42b24ce84eafaf56f2">  703</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#gaa44ba74c5036ac42b24ce84eafaf56f2">ADS1256_RequestMeasurement</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga2388b60ca886620f0daba1efc69c940a">ADS1256_Wakeup</a>(); <span class="comment">/* Send WAKEUP command byte */</span></div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;}</div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;</div>
<div class="line"><a name="l00713"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga91d8582f9d5cb52b54fb801644e05e21">  713</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga91d8582f9d5cb52b54fb801644e05e21">ADS1256_ReadData</a>(uint8_t* data) {</div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;    ADS1256_CS_LOW(); <span class="comment">/* Enable SPI communication */</span></div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga81371e39460504d1badd6291ef5ba2f7">ADS1256_SendByte</a>(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a4fba878e65192a50066360cc328630c6">ADS1256_RDATA</a>); <span class="comment">/* Send RDATA command byte */</span></div>
<div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>((uint64_t) (50U * ADS1256_CLK_PERIOD_US)); <span class="comment">/*  timing characteristic t6 */</span></div>
<div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;    <a class="code" href="group__ads1256__driver.html#gadadfc4d298fad4e9833975340b7eeaae">ADS1256_ReceiveBytes</a>(data, 3U);</div>
<div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga0c9c039ac03ad1280102b1f05c056071">ADS1256_CS_HIGH</a>(); <span class="comment">/* Latch SPI communication */</span></div>
<div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>((uint64_t) (4U * ADS1256_CLK_PERIOD_US)); <span class="comment">/*  timing characteristic t11 */</span></div>
<div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;}</div>
<div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;</div>
<div class="line"><a name="l00728"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga458c5bdb28d0e87e28cdaa9cfcd5f429">  728</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga458c5bdb28d0e87e28cdaa9cfcd5f429">ADS1256_WaitUntilDataReady</a>(<span class="keywordtype">bool</span> useCommand) {</div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;    uint8_t i = 0U;</div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;    <span class="keywordflow">while</span> (!<a class="code" href="group__ads1256__driver.html#gafa9381054942c98cb2be8881e86bc209">ADS1256_IsDataReady</a>(useCommand)) { <span class="comment">/* Wait in a loop */</span></div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;        ++i; <span class="comment">/* Do a meaningful calculation so the compiler does not remove loop. */</span></div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;    }</div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;}</div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;</div>
<div class="line"><a name="l00741"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gafa9381054942c98cb2be8881e86bc209">  741</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__ads1256__driver.html#gafa9381054942c98cb2be8881e86bc209">ADS1256_IsDataReady</a>(<span class="keywordtype">bool</span> useCommand) {</div>
<div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;    <span class="comment">/* TODO: This method should be smart enough to determine if the DRDY pin has been enabled and default to SPI if not. */</span></div>
<div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;    <span class="keywordflow">if</span> (useCommand) { <span class="comment">/* If we are using the SPI command */</span></div>
<div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;        ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>); <span class="comment">/* Read the status register from the device */</span></div>
<div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;        uint8_t byte = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__status__register.html#ga8836defa503977dda06238596f6bb8e3">ADS1256_DRDY_BIT</a>, <a class="code" href="group__status__register.html#ga39195cf60d4a91b0b61a5461ed1a5a67">ADS1256_DRDY_SPAN</a>); <span class="comment">/* Retrieve the DRDY bit from the register */</span></div>
<div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;        <span class="keywordtype">bool</span> ready = <span class="keyword">false</span>; <span class="comment">/* Assume data is not ready */</span></div>
<div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;        <span class="keywordflow">if</span> (byte == <a class="code" href="group__ads1256__driver.html#ggaf437774eb0db277a2916b6322213b449a0487f4550f3178d69a29cde93e86918c">ADS1256_DATA_READY</a>) {</div>
<div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;            ready = <span class="keyword">true</span>; <span class="comment">/* Data is ready. DRDY active low */</span></div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;        }</div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;<span class="preprocessor"></span>        printf(<span class="stringliteral">&quot;[ADS1256] ADS1256 Data ready: 0x%02X\n\r&quot;</span>, byte);</div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;<span class="preprocessor"></span>        <span class="keywordflow">return</span> ready;</div>
<div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;        <span class="comment">/* The intention is that false = 0 = data ready so we negate the logic */</span></div>
<div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;        <span class="keywordflow">return</span> !GPIO_ReadInputDataBit(ADS1256_DRDY_GPIO_PORT, ADS1256_DRDY_PIN);</div>
<div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;    }</div>
<div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;}</div>
<div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;</div>
<div class="line"><a name="l00768"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">  768</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a>(<span class="keywordtype">bool</span> useCommand) {</div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;    <span class="comment">/* TODO: This method should be smart enough to determine if the SYNC pin has been enabled and default to SPI if not. */</span></div>
<div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;    SYNC_USE_COMMAND = useCommand;</div>
<div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;    <span class="keywordflow">if</span> (useCommand) {</div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;        ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a16dda7b760f74ca18488460f89193303">ADS1256_SYNC</a>); <span class="comment">/* Send SYNC command byte */</span></div>
<div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;        <span class="comment">/* TODO: Write SYNC pin high */</span></div>
<div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;        <span class="comment">/* TODO: use sync pin */</span></div>
<div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;    }</div>
<div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>((uint64_t) (24U * ADS1256_CLK_PERIOD_US)); <span class="comment">/* Timing characteristic t11 for SYNC */</span></div>
<div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;}</div>
<div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;</div>
<div class="line"><a name="l00787"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga2388b60ca886620f0daba1efc69c940a">  787</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga2388b60ca886620f0daba1efc69c940a">ADS1256_Wakeup</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;    <span class="keywordflow">if</span> (SYNC_USE_COMMAND == <span class="keyword">true</span>) { <span class="comment">/* If we should use SPI */</span></div>
<div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;        ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a7ec76391f15bfc4dbc9f67f657793a8a">ADS1256_WAKEUP</a>); <span class="comment">/* Send WAKEUP command byte */</span></div>
<div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;        SYNC_USE_COMMAND = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;        <span class="comment">/* TODO: Handle this wakeup */</span></div>
<div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;    }</div>
<div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;}</div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;</div>
<div class="line"><a name="l00802"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga5a915f192a268c5737f34dcbe2859524">  802</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga5a915f192a268c5737f34dcbe2859524">ADS1256_Standby</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;    ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42ac774622b486ccde765515c2de6b45bda">ADS1256_STANDBY</a>); <span class="comment">/* Send the STANDBY command byte */</span></div>
<div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;    SYNC_USE_COMMAND = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;}</div>
<div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;</div>
<div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;</div>
<div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;</div>
<div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;<span class="comment">/* CALIBRATION METHODS */</span></div>
<div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;</div>
<div class="line"><a name="l00820"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga72de73cf9585121dd65895c6addf16ff">  820</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga72de73cf9585121dd65895c6addf16ff">ADS1256_CalibrateSelf</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;    ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42abc99c1ced898bb7b5d16bd6e73e8d2e1">ADS1256_SELFCAL</a>); <span class="comment">/* Send the self cal command */</span></div>
<div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga458c5bdb28d0e87e28cdaa9cfcd5f429">ADS1256_WaitUntilDataReady</a>(<span class="keyword">false</span>); <span class="comment">/* Wait until the ADC signals it is finished */</span></div>
<div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a>(<span class="keyword">true</span>); <span class="comment">/* Enter the SYNC state */</span></div>
<div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;}</div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;</div>
<div class="line"><a name="l00833"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga96e7231f5e5efc15c39b81b21baf1b95">  833</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga96e7231f5e5efc15c39b81b21baf1b95">ADS1256_CalibrateSelf_Gain</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;    ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42af0834ed9ad198db005df6fe8508c4c83">ADS1256_SELFGCAL</a>); <span class="comment">/* Send the self gain cal command */</span></div>
<div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga458c5bdb28d0e87e28cdaa9cfcd5f429">ADS1256_WaitUntilDataReady</a>(<span class="keyword">false</span>); <span class="comment">/* Wait until the ADC signals it is finished */</span></div>
<div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a>(<span class="keyword">true</span>); <span class="comment">/* Enter the SYNC state */</span></div>
<div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;}</div>
<div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;</div>
<div class="line"><a name="l00846"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga16aea61ac77485fb889c960e16b0ed6b">  846</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga16aea61ac77485fb889c960e16b0ed6b">ADS1256_CalibrateSelf_Offset</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;    ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42aa6ae2f4d183376bc577810a320dbb227">ADS1256_SELFOCAL</a>); <span class="comment">/* Send the self offset cal command */</span></div>
<div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga458c5bdb28d0e87e28cdaa9cfcd5f429">ADS1256_WaitUntilDataReady</a>(<span class="keyword">false</span>); <span class="comment">/* Wait until the ADC signals it is finished */</span></div>
<div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a>(<span class="keyword">true</span>); <span class="comment">/* Enter the SYNC state */</span></div>
<div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;}</div>
<div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;</div>
<div class="line"><a name="l00860"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga46a14d9bcba054e6b6db5b4f8f0bf895">  860</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga46a14d9bcba054e6b6db5b4f8f0bf895">ADS1256_CalibrateSystem_Gain</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;    ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42aa07436d08b9a5a260db9d8c1107a5af9">ADS1256_SYSGCAL</a>); <span class="comment">/* Send the system gain cal command */</span></div>
<div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga458c5bdb28d0e87e28cdaa9cfcd5f429">ADS1256_WaitUntilDataReady</a>(<span class="keyword">false</span>); <span class="comment">/* Wait until the ADC signals it is finished */</span></div>
<div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a>(<span class="keyword">true</span>); <span class="comment">/* Enter the SYNC state */</span></div>
<div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;}</div>
<div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;</div>
<div class="line"><a name="l00873"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gab49754dd631e07c61fed6c41b18ad88e">  873</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#gab49754dd631e07c61fed6c41b18ad88e">ADS1256_CalibrateSystem_Offset</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;    ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a364c3ff9b43a6bd1a5bc716ee2327e8b">ADS1256_SYSOCAL</a>); <span class="comment">/* Send the system offset cal command */</span></div>
<div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga458c5bdb28d0e87e28cdaa9cfcd5f429">ADS1256_WaitUntilDataReady</a>(<span class="keyword">false</span>); <span class="comment">/* Wait until the ADC signals it is finished */</span></div>
<div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a>(<span class="keyword">true</span>); <span class="comment">/* Enter the SYNC state */</span></div>
<div class="line"><a name="l00877"></a><span class="lineno">  877</span>&#160;}</div>
<div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;</div>
<div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;</div>
<div class="line"><a name="l00880"></a><span class="lineno">  880</span>&#160;</div>
<div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;<span class="comment">/* UTILITY METHODS */</span></div>
<div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;</div>
<div class="line"><a name="l00891"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gad8605a86bb12367efea3074b97dfa529">  891</a></span>&#160;int32_t <a class="code" href="group__ads1256__driver.html#gad8605a86bb12367efea3074b97dfa529">ADS1256_ConvertRawValue</a>(uint32_t value) {</div>
<div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Converting raw value: 0x%08X / %i\n\r&quot;</span>, value, value);</div>
<div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160;<span class="preprocessor"></span>    <span class="comment">/*  Convert unsigned int to signed int explicitly so the compiler doesn&#39;t do something unexpected. */</span></div>
<div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;    <span class="keywordflow">if</span> ((value &amp; <a class="code" href="_a_d_s1256___driver_8c.html#a04429776ba95839668cd3af623650e87">ADS1256_NEGATIVE_FLAG</a>) != 0U){</div>
<div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;        <span class="comment">/* It is a negative number */</span></div>
<div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;        value |= <a class="code" href="_a_d_s1256___driver_8c.html#ab81fe3f8a82390e44e042f351df3f59c">ADS1256_NEGATIVE_PADDING</a>;</div>
<div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;    }</div>
<div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;    <span class="keywordflow">return</span> ((int32_t) value);</div>
<div class="line"><a name="l00901"></a><span class="lineno">  901</span>&#160;}</div>
<div class="line"><a name="l00902"></a><span class="lineno">  902</span>&#160;</div>
<div class="line"><a name="l00909"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga4a1749dfc2cad3986a2f29cbe6e63b87">  909</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="group__ads1256__driver.html#ga4a1749dfc2cad3986a2f29cbe6e63b87">ADS1256_GetSelfCalTime</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l00910"></a><span class="lineno">  910</span>&#160;    <span class="keywordtype">float</span> retval = 0.892f;</div>
<div class="line"><a name="l00911"></a><span class="lineno">  911</span>&#160;    <span class="keywordflow">switch</span> (SPS) {</div>
<div class="line"><a name="l00912"></a><span class="lineno">  912</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a>:</div>
<div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;        <span class="keywordflow">switch</span> (PGA) {</div>
<div class="line"><a name="l00914"></a><span class="lineno">  914</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>:</div>
<div class="line"><a name="l00915"></a><span class="lineno">  915</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a>:</div>
<div class="line"><a name="l00916"></a><span class="lineno">  916</span>&#160;            retval = 0.596f;</div>
<div class="line"><a name="l00917"></a><span class="lineno">  917</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00918"></a><span class="lineno">  918</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a>:</div>
<div class="line"><a name="l00919"></a><span class="lineno">  919</span>&#160;            retval = 0.692f;</div>
<div class="line"><a name="l00920"></a><span class="lineno">  920</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00921"></a><span class="lineno">  921</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a>:</div>
<div class="line"><a name="l00922"></a><span class="lineno">  922</span>&#160;            retval = 0.696f;</div>
<div class="line"><a name="l00923"></a><span class="lineno">  923</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00924"></a><span class="lineno">  924</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a>:</div>
<div class="line"><a name="l00925"></a><span class="lineno">  925</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a>:</div>
<div class="line"><a name="l00926"></a><span class="lineno">  926</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a>:</div>
<div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;            retval = 0.892f;</div>
<div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;        <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00930"></a><span class="lineno">  930</span>&#160;            retval = 0.892f;</div>
<div class="line"><a name="l00931"></a><span class="lineno">  931</span>&#160;        }</div>
<div class="line"><a name="l00932"></a><span class="lineno">  932</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00933"></a><span class="lineno">  933</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af955d6f41a97fe05c19e33875b9f8179">ADS1256_SPS_15000</a>:</div>
<div class="line"><a name="l00934"></a><span class="lineno">  934</span>&#160;            <span class="keywordflow">switch</span> (PGA) {</div>
<div class="line"><a name="l00935"></a><span class="lineno">  935</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>:</div>
<div class="line"><a name="l00936"></a><span class="lineno">  936</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a>:</div>
<div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a>:</div>
<div class="line"><a name="l00938"></a><span class="lineno">  938</span>&#160;                retval = 0.696f;</div>
<div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a>:</div>
<div class="line"><a name="l00941"></a><span class="lineno">  941</span>&#160;                retval = 0.762f;</div>
<div class="line"><a name="l00942"></a><span class="lineno">  942</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00943"></a><span class="lineno">  943</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a>:</div>
<div class="line"><a name="l00944"></a><span class="lineno">  944</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a>:</div>
<div class="line"><a name="l00945"></a><span class="lineno">  945</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a>:</div>
<div class="line"><a name="l00946"></a><span class="lineno">  946</span>&#160;                retval = 0.896f;</div>
<div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00948"></a><span class="lineno">  948</span>&#160;            <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;                 retval = 0.896f;</div>
<div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;            }</div>
<div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a04ee81dece7d46e4d4db5ed37f358b0d">ADS1256_SPS_7500</a>:</div>
<div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160;                <span class="keywordflow">switch</span> (PGA) {</div>
<div class="line"><a name="l00954"></a><span class="lineno">  954</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>:</div>
<div class="line"><a name="l00955"></a><span class="lineno">  955</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a>:</div>
<div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a>:</div>
<div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a>:</div>
<div class="line"><a name="l00958"></a><span class="lineno">  958</span>&#160;                    retval = 0.896f;</div>
<div class="line"><a name="l00959"></a><span class="lineno">  959</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00960"></a><span class="lineno">  960</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a>:</div>
<div class="line"><a name="l00961"></a><span class="lineno">  961</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a>:</div>
<div class="line"><a name="l00962"></a><span class="lineno">  962</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a>:</div>
<div class="line"><a name="l00963"></a><span class="lineno">  963</span>&#160;                    retval = 1.029f;</div>
<div class="line"><a name="l00964"></a><span class="lineno">  964</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00965"></a><span class="lineno">  965</span>&#160;                <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00966"></a><span class="lineno">  966</span>&#160;                    retval = 1.029f;</div>
<div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;                }</div>
<div class="line"><a name="l00969"></a><span class="lineno">  969</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00970"></a><span class="lineno">  970</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ac08e0021f65ebc828e467da3713964ed">ADS1256_SPS_3750</a>:</div>
<div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;                    retval = 1.3f;</div>
<div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af12dc4b35be49d560742916582e6176c">ADS1256_SPS_2000</a>:</div>
<div class="line"><a name="l00974"></a><span class="lineno">  974</span>&#160;                    retval = 2.0f;</div>
<div class="line"><a name="l00975"></a><span class="lineno">  975</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00976"></a><span class="lineno">  976</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a12d8d1323c2628fe27a17765b06d0af0">ADS1256_SPS_1000</a>:</div>
<div class="line"><a name="l00977"></a><span class="lineno">  977</span>&#160;                    retval = 3.6f;</div>
<div class="line"><a name="l00978"></a><span class="lineno">  978</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00979"></a><span class="lineno">  979</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ae658af6aeb6976e4333295abe9cd2bfe">ADS1256_SPS_500</a>:</div>
<div class="line"><a name="l00980"></a><span class="lineno">  980</span>&#160;                    retval = 6.6f;</div>
<div class="line"><a name="l00981"></a><span class="lineno">  981</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00982"></a><span class="lineno">  982</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a610b2d5c532647c47eccfae4f38180c9">ADS1256_SPS_100</a>:</div>
<div class="line"><a name="l00983"></a><span class="lineno">  983</span>&#160;                    retval = 31.2f;</div>
<div class="line"><a name="l00984"></a><span class="lineno">  984</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00985"></a><span class="lineno">  985</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a7a94d4abfbc3f888640cc1301bba481c">ADS1256_SPS_60</a>:</div>
<div class="line"><a name="l00986"></a><span class="lineno">  986</span>&#160;                    retval = 50.9f;</div>
<div class="line"><a name="l00987"></a><span class="lineno">  987</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00988"></a><span class="lineno">  988</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a5146cfab8c3f5a4229a192d7f6c75fee">ADS1256_SPS_50</a>:</div>
<div class="line"><a name="l00989"></a><span class="lineno">  989</span>&#160;                    retval = 61.8f;</div>
<div class="line"><a name="l00990"></a><span class="lineno">  990</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00991"></a><span class="lineno">  991</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af00f11dbdf6bc388f20b6ee3b6e4bec3">ADS1256_SPS_30</a>:</div>
<div class="line"><a name="l00992"></a><span class="lineno">  992</span>&#160;                    retval = 101.3f;</div>
<div class="line"><a name="l00993"></a><span class="lineno">  993</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00994"></a><span class="lineno">  994</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a0f9109a1a40838123ccd55e1af90a3e6">ADS1256_SPS_25</a>:</div>
<div class="line"><a name="l00995"></a><span class="lineno">  995</span>&#160;                    retval = 123.2f;</div>
<div class="line"><a name="l00996"></a><span class="lineno">  996</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00997"></a><span class="lineno">  997</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731acebddb9fec5c26050c0f10760593c7b8">ADS1256_SPS_15</a>:</div>
<div class="line"><a name="l00998"></a><span class="lineno">  998</span>&#160;                    retval = 202.1f;</div>
<div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a968c2e2d2088b56c7983ea25d88ab095">ADS1256_SPS_10</a>:</div>
<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;                    retval = 307.2f;</div>
<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a60cbd1927b566eafda96104ece8d7e70">ADS1256_SPS_5</a>:</div>
<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;                    retval = 613.8f;</div>
<div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731adac392298502254c3d10c687fa20e230">ADS1256_SPS_2_5</a>:</div>
<div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;                    retval = 1227.2f;</div>
<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;                <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;                    retval = 1227.2f;</div>
<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;    }</div>
<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;    <span class="keywordflow">return</span> retval;</div>
<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;}</div>
<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;</div>
<div class="line"><a name="l01021"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga2628d1ea4f1436c89584bcc47baf79ef"> 1021</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="group__ads1256__driver.html#ga2628d1ea4f1436c89584bcc47baf79ef">ADS1256_GetOffsetCalTime</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;    <span class="keywordflow">switch</span> (SPS) {</div>
<div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a>:</div>
<div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;        <span class="keywordflow">return</span> 0.387f;</div>
<div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af955d6f41a97fe05c19e33875b9f8179">ADS1256_SPS_15000</a>:</div>
<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;        <span class="keywordflow">return</span> 0.453f;</div>
<div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a04ee81dece7d46e4d4db5ed37f358b0d">ADS1256_SPS_7500</a>:</div>
<div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160;        <span class="keywordflow">return</span> 0.587f;</div>
<div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ac08e0021f65ebc828e467da3713964ed">ADS1256_SPS_3750</a>:</div>
<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;        <span class="keywordflow">return</span> 0.853f;</div>
<div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af12dc4b35be49d560742916582e6176c">ADS1256_SPS_2000</a>:</div>
<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;        <span class="keywordflow">return</span> 1.3f;</div>
<div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a12d8d1323c2628fe27a17765b06d0af0">ADS1256_SPS_1000</a>:</div>
<div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;        <span class="keywordflow">return</span> 2.3f;</div>
<div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ae658af6aeb6976e4333295abe9cd2bfe">ADS1256_SPS_500</a>:</div>
<div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;        <span class="keywordflow">return</span> 4.3f;</div>
<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a610b2d5c532647c47eccfae4f38180c9">ADS1256_SPS_100</a>:</div>
<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;        <span class="keywordflow">return</span> 20.3f;</div>
<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a7a94d4abfbc3f888640cc1301bba481c">ADS1256_SPS_60</a>:</div>
<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;        <span class="keywordflow">return</span> 33.7f;</div>
<div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a5146cfab8c3f5a4229a192d7f6c75fee">ADS1256_SPS_50</a>:</div>
<div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;        <span class="keywordflow">return</span> 40.3f;</div>
<div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af00f11dbdf6bc388f20b6ee3b6e4bec3">ADS1256_SPS_30</a>:</div>
<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;        <span class="keywordflow">return</span> 67.0f;</div>
<div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a0f9109a1a40838123ccd55e1af90a3e6">ADS1256_SPS_25</a>:</div>
<div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;        <span class="keywordflow">return</span> 80.3f;</div>
<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731acebddb9fec5c26050c0f10760593c7b8">ADS1256_SPS_15</a>:</div>
<div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160;        <span class="keywordflow">return</span> 133.7f;</div>
<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a968c2e2d2088b56c7983ea25d88ab095">ADS1256_SPS_10</a>:</div>
<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;        <span class="keywordflow">return</span> 200.3f;</div>
<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a60cbd1927b566eafda96104ece8d7e70">ADS1256_SPS_5</a>:</div>
<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160;        <span class="keywordflow">return</span> 400.3f;</div>
<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731adac392298502254c3d10c687fa20e230">ADS1256_SPS_2_5</a>:</div>
<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;        <span class="keywordflow">return</span> 800.3f;</div>
<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160;        <span class="keywordflow">return</span> 800.3f;</div>
<div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160;    }</div>
<div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160;}</div>
<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;</div>
<div class="line"><a name="l01066"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga041017c82a9411b72436c29667e98960"> 1066</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="group__ads1256__driver.html#ga041017c82a9411b72436c29667e98960">ADS1256_GetSelfGainCalTime</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;    <span class="keywordflow">switch</span> (SPS) {</div>
<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a>:</div>
<div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160;        <span class="keywordflow">switch</span> (PGA) {</div>
<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>:</div>
<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a>:</div>
<div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160;            <span class="keywordflow">return</span> 0.417f;</div>
<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a>:</div>
<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;            <span class="keywordflow">return</span> 0.451f;</div>
<div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a>:</div>
<div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;            <span class="keywordflow">return</span> 0.517f;</div>
<div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a>:</div>
<div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a>:</div>
<div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a>:</div>
<div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;            <span class="keywordflow">return</span> 0.651f;</div>
<div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;        <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;            <span class="keywordflow">return</span> 0.651f;</div>
<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;        }</div>
<div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af955d6f41a97fe05c19e33875b9f8179">ADS1256_SPS_15000</a>:</div>
<div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160;            <span class="keywordflow">switch</span> (PGA) {</div>
<div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>:</div>
<div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a>:</div>
<div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a>:</div>
<div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;                <span class="keywordflow">return</span> 0.484f;</div>
<div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a>:</div>
<div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a>:</div>
<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a>:</div>
<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a>:</div>
<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160;                <span class="keywordflow">return</span> 0.551f;</div>
<div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;            <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160;                <span class="keywordflow">return</span> 0.551f;</div>
<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160;            }</div>
<div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160;            <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a04ee81dece7d46e4d4db5ed37f358b0d">ADS1256_SPS_7500</a>:</div>
<div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;                <span class="keywordflow">switch</span> (PGA) {</div>
<div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>:</div>
<div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a>:</div>
<div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a>:</div>
<div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a>:</div>
<div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;                    <span class="keywordflow">return</span> 0.617f;</div>
<div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a>:</div>
<div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a>:</div>
<div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a>:</div>
<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;                    <span class="keywordflow">return</span> 0.751f;</div>
<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;                <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;                    <span class="keywordflow">return</span> 0.751f;</div>
<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;                }</div>
<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ac08e0021f65ebc828e467da3713964ed">ADS1256_SPS_3750</a>:</div>
<div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160;                    <span class="keywordflow">return</span> 0.884f;</div>
<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af12dc4b35be49d560742916582e6176c">ADS1256_SPS_2000</a>:</div>
<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160;                    <span class="keywordflow">return</span> 1.4f;</div>
<div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a12d8d1323c2628fe27a17765b06d0af0">ADS1256_SPS_1000</a>:</div>
<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>&#160;                    <span class="keywordflow">return</span> 2.4f;</div>
<div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ae658af6aeb6976e4333295abe9cd2bfe">ADS1256_SPS_500</a>:</div>
<div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>&#160;                    <span class="keywordflow">return</span> 4.5f;</div>
<div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a610b2d5c532647c47eccfae4f38180c9">ADS1256_SPS_100</a>:</div>
<div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>&#160;                    <span class="keywordflow">return</span> 21.0f;</div>
<div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a7a94d4abfbc3f888640cc1301bba481c">ADS1256_SPS_60</a>:</div>
<div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>&#160;                    <span class="keywordflow">return</span> 34.1f;</div>
<div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a5146cfab8c3f5a4229a192d7f6c75fee">ADS1256_SPS_50</a>:</div>
<div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>&#160;                    <span class="keywordflow">return</span> 41.7f;</div>
<div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af00f11dbdf6bc388f20b6ee3b6e4bec3">ADS1256_SPS_30</a>:</div>
<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;                    <span class="keywordflow">return</span> 67.8f;</div>
<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a0f9109a1a40838123ccd55e1af90a3e6">ADS1256_SPS_25</a>:</div>
<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160;                    <span class="keywordflow">return</span> 83.0f;</div>
<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731acebddb9fec5c26050c0f10760593c7b8">ADS1256_SPS_15</a>:</div>
<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;                    <span class="keywordflow">return</span> 135.3f;</div>
<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a968c2e2d2088b56c7983ea25d88ab095">ADS1256_SPS_10</a>:</div>
<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160;                    <span class="keywordflow">return</span> 207.0f;</div>
<div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a60cbd1927b566eafda96104ece8d7e70">ADS1256_SPS_5</a>:</div>
<div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;                    <span class="keywordflow">return</span> 413.7f;</div>
<div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731adac392298502254c3d10c687fa20e230">ADS1256_SPS_2_5</a>:</div>
<div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;                    <span class="keywordflow">return</span> 827.0f;</div>
<div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160;                <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160;                    <span class="keywordflow">return</span> 827.0f;</div>
<div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>&#160;    }</div>
<div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>&#160;}</div>
<div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>&#160;</div>
<div class="line"><a name="l01152"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga429559f049274cd24a6be2b20fd82973"> 1152</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="group__ads1256__driver.html#ga429559f049274cd24a6be2b20fd82973">ADS1256_GetSystemGainCalTime</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160;    <span class="keywordflow">switch</span> (SPS) {</div>
<div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a>:</div>
<div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160;        <span class="keywordflow">return</span> 0.417f;</div>
<div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af955d6f41a97fe05c19e33875b9f8179">ADS1256_SPS_15000</a>:</div>
<div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160;        <span class="keywordflow">return</span> 0.484f;</div>
<div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a04ee81dece7d46e4d4db5ed37f358b0d">ADS1256_SPS_7500</a>:</div>
<div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160;        <span class="keywordflow">return</span> 0.617f;</div>
<div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ac08e0021f65ebc828e467da3713964ed">ADS1256_SPS_3750</a>:</div>
<div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160;        <span class="keywordflow">return</span> 0.884f;</div>
<div class="line"><a name="l01162"></a><span class="lineno"> 1162</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af12dc4b35be49d560742916582e6176c">ADS1256_SPS_2000</a>:</div>
<div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;        <span class="keywordflow">return</span> 1.4f;</div>
<div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a12d8d1323c2628fe27a17765b06d0af0">ADS1256_SPS_1000</a>:</div>
<div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>&#160;        <span class="keywordflow">return</span> 2.4f;</div>
<div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ae658af6aeb6976e4333295abe9cd2bfe">ADS1256_SPS_500</a>:</div>
<div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160;        <span class="keywordflow">return</span> 4.4f;</div>
<div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a610b2d5c532647c47eccfae4f38180c9">ADS1256_SPS_100</a>:</div>
<div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160;        <span class="keywordflow">return</span> 20.4f;</div>
<div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a7a94d4abfbc3f888640cc1301bba481c">ADS1256_SPS_60</a>:</div>
<div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160;        <span class="keywordflow">return</span> 33.7f;</div>
<div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a5146cfab8c3f5a4229a192d7f6c75fee">ADS1256_SPS_50</a>:</div>
<div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160;        <span class="keywordflow">return</span> 40.4f;</div>
<div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af00f11dbdf6bc388f20b6ee3b6e4bec3">ADS1256_SPS_30</a>:</div>
<div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160;        <span class="keywordflow">return</span> 67.0f;</div>
<div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a0f9109a1a40838123ccd55e1af90a3e6">ADS1256_SPS_25</a>:</div>
<div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>&#160;        <span class="keywordflow">return</span> 80.4f;</div>
<div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731acebddb9fec5c26050c0f10760593c7b8">ADS1256_SPS_15</a>:</div>
<div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>&#160;        <span class="keywordflow">return</span> 133.7f;</div>
<div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a968c2e2d2088b56c7983ea25d88ab095">ADS1256_SPS_10</a>:</div>
<div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160;        <span class="keywordflow">return</span> 200.4f;</div>
<div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a60cbd1927b566eafda96104ece8d7e70">ADS1256_SPS_5</a>:</div>
<div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>&#160;        <span class="keywordflow">return</span> 400.4f;</div>
<div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731adac392298502254c3d10c687fa20e230">ADS1256_SPS_2_5</a>:</div>
<div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>&#160;        <span class="keywordflow">return</span> 800.4f;</div>
<div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160;        <span class="keywordflow">return</span> 800.4f;</div>
<div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160;    }</div>
<div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;}</div>
<div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160;</div>
<div class="line"><a name="l01197"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga5cb8add9c1b77b2cf87be526d6363d1c"> 1197</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="group__ads1256__driver.html#ga5cb8add9c1b77b2cf87be526d6363d1c">ADS1256_GetSettlingTime</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01198"></a><span class="lineno"> 1198</span>&#160;    <a class="code" href="group__ads1256__driver.html#gacf2f61cb43087ae7c270f00d24b27526">ADS1256_GetDataRate</a>(); <span class="comment">/* Update the register if we need to */</span></div>
<div class="line"><a name="l01199"></a><span class="lineno"> 1199</span>&#160;    <span class="keywordflow">switch</span> (SPS) {</div>
<div class="line"><a name="l01200"></a><span class="lineno"> 1200</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a>:</div>
<div class="line"><a name="l01201"></a><span class="lineno"> 1201</span>&#160;        <span class="keywordflow">return</span> 0.21f;</div>
<div class="line"><a name="l01202"></a><span class="lineno"> 1202</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af955d6f41a97fe05c19e33875b9f8179">ADS1256_SPS_15000</a>:</div>
<div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>&#160;        <span class="keywordflow">return</span> 0.25f;</div>
<div class="line"><a name="l01204"></a><span class="lineno"> 1204</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a04ee81dece7d46e4d4db5ed37f358b0d">ADS1256_SPS_7500</a>:</div>
<div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>&#160;        <span class="keywordflow">return</span> 0.31f;</div>
<div class="line"><a name="l01206"></a><span class="lineno"> 1206</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ac08e0021f65ebc828e467da3713964ed">ADS1256_SPS_3750</a>:</div>
<div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>&#160;        <span class="keywordflow">return</span> 0.44f;</div>
<div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af12dc4b35be49d560742916582e6176c">ADS1256_SPS_2000</a>:</div>
<div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>&#160;        <span class="keywordflow">return</span> 0.68f;</div>
<div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a12d8d1323c2628fe27a17765b06d0af0">ADS1256_SPS_1000</a>:</div>
<div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>&#160;        <span class="keywordflow">return</span> 1.18f;</div>
<div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ae658af6aeb6976e4333295abe9cd2bfe">ADS1256_SPS_500</a>:</div>
<div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>&#160;        <span class="keywordflow">return</span> 2.18f;</div>
<div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a610b2d5c532647c47eccfae4f38180c9">ADS1256_SPS_100</a>:</div>
<div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>&#160;        <span class="keywordflow">return</span> 10.18f;</div>
<div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a7a94d4abfbc3f888640cc1301bba481c">ADS1256_SPS_60</a>:</div>
<div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>&#160;        <span class="keywordflow">return</span> 16.84f;</div>
<div class="line"><a name="l01218"></a><span class="lineno"> 1218</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a5146cfab8c3f5a4229a192d7f6c75fee">ADS1256_SPS_50</a>:</div>
<div class="line"><a name="l01219"></a><span class="lineno"> 1219</span>&#160;        <span class="keywordflow">return</span> 20.18f;</div>
<div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af00f11dbdf6bc388f20b6ee3b6e4bec3">ADS1256_SPS_30</a>:</div>
<div class="line"><a name="l01221"></a><span class="lineno"> 1221</span>&#160;        <span class="keywordflow">return</span> 33.51f;</div>
<div class="line"><a name="l01222"></a><span class="lineno"> 1222</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a0f9109a1a40838123ccd55e1af90a3e6">ADS1256_SPS_25</a>:</div>
<div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>&#160;        <span class="keywordflow">return</span> 40.18f;</div>
<div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731acebddb9fec5c26050c0f10760593c7b8">ADS1256_SPS_15</a>:</div>
<div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160;        <span class="keywordflow">return</span> 66.84f;</div>
<div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a968c2e2d2088b56c7983ea25d88ab095">ADS1256_SPS_10</a>:</div>
<div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160;        <span class="keywordflow">return</span> 100.18f;</div>
<div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a60cbd1927b566eafda96104ece8d7e70">ADS1256_SPS_5</a>:</div>
<div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160;        <span class="keywordflow">return</span> 200.18f;</div>
<div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731adac392298502254c3d10c687fa20e230">ADS1256_SPS_2_5</a>:</div>
<div class="line"><a name="l01231"></a><span class="lineno"> 1231</span>&#160;        <span class="keywordflow">return</span> 400.18f;</div>
<div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>&#160;<span class="preprocessor"></span>        printf(<span class="stringliteral">&quot;[ADS1256] Failed to look up settling time for 0x%02X!\n\r&quot;</span>, SPS);</div>
<div class="line"><a name="l01235"></a><span class="lineno"> 1235</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01236"></a><span class="lineno"> 1236</span>&#160;<span class="preprocessor"></span>        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>&#160;    }</div>
<div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>&#160;}</div>
<div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>&#160;</div>
<div class="line"><a name="l01246"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gad426414f0eab896faac18f0c6d4dbaa2"> 1246</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#gad426414f0eab896faac18f0c6d4dbaa2">ADS1256_AlwayFetch</a>(<span class="keywordtype">bool</span> always) {</div>
<div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>&#160;    ADS1256_AlwaysReadReg = always;</div>
<div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>&#160;}</div>
<div class="line"><a name="l01249"></a><span class="lineno"> 1249</span>&#160;</div>
<div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>&#160;</div>
<div class="line"><a name="l01251"></a><span class="lineno"> 1251</span>&#160;</div>
<div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01253"></a><span class="lineno"> 1253</span>&#160;<span class="comment">/* STATUS REGISTER METHODS */</span></div>
<div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01255"></a><span class="lineno"> 1255</span>&#160;</div>
<div class="line"><a name="l01262"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gaec26aa231ee327bf65220eee6f779b81"> 1262</a></span>&#160;uint8_t <a class="code" href="group__ads1256__driver.html#gaec26aa231ee327bf65220eee6f779b81">ADS1256_GetFactoryProgrammedID</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01263"></a><span class="lineno"> 1263</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>);</div>
<div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>&#160;    uint8_t byte = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__status__register.html#ga14da33a69f54e320a00c3e33e9dcf44a">ADS1256_ID_BIT</a>,</div>
<div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>&#160;            <a class="code" href="group__status__register.html#ga4b89c536e185cfdbd9fa248a3e3772b7">ADS1256_ID_SPAN</a>);</div>
<div class="line"><a name="l01266"></a><span class="lineno"> 1266</span>&#160;<span class="preprocessor">#ifdef ADS156_DEBUG</span></div>
<div class="line"><a name="l01267"></a><span class="lineno"> 1267</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Device ID: 0x%02X\n\r&quot;</span>, byte);</div>
<div class="line"><a name="l01268"></a><span class="lineno"> 1268</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01269"></a><span class="lineno"> 1269</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> byte;</div>
<div class="line"><a name="l01270"></a><span class="lineno"> 1270</span>&#160;}</div>
<div class="line"><a name="l01271"></a><span class="lineno"> 1271</span>&#160;</div>
<div class="line"><a name="l01278"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga6f362fc42d375f4aec10bd2115dfd85d"> 1278</a></span>&#160;<a class="code" href="group__ads1256__driver.html#ga3615e2e1ba70971dcdd5f7e54ffe5606">ADS1256_ORDER_t</a> <a class="code" href="group__ads1256__driver.html#ga6f362fc42d375f4aec10bd2115dfd85d">ADS1256_GetDataOutputBitOrder</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01279"></a><span class="lineno"> 1279</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>);</div>
<div class="line"><a name="l01280"></a><span class="lineno"> 1280</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga3615e2e1ba70971dcdd5f7e54ffe5606">ADS1256_ORDER_t</a> order = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>,</div>
<div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>&#160;            <a class="code" href="group__status__register.html#ga295221d00dc4ae777c591ffdbc7f8922">ADS1256_ORDER_BIT</a>, <a class="code" href="group__status__register.html#gaa07ca51df9b9ce477186cf92d331a59c">ADS1256_ORDER_SPAN</a>);</div>
<div class="line"><a name="l01282"></a><span class="lineno"> 1282</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01283"></a><span class="lineno"> 1283</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Output bit order: 0x%02X\n\r&quot;</span>, order);</div>
<div class="line"><a name="l01284"></a><span class="lineno"> 1284</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> order;</div>
<div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>&#160;}</div>
<div class="line"><a name="l01287"></a><span class="lineno"> 1287</span>&#160;</div>
<div class="line"><a name="l01294"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga3a4dac1ff9bffcccbc561853a9598554"> 1294</a></span>&#160;<a class="code" href="group__ads1256__driver.html#ga17864ca559c443a262068f0d19406113">ADS1256_ACAL_t</a> <a class="code" href="group__ads1256__driver.html#ga3a4dac1ff9bffcccbc561853a9598554">ADS1256_GetAutoCalSetting</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>);</div>
<div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga17864ca559c443a262068f0d19406113">ADS1256_ACAL_t</a> acal = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>,</div>
<div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>&#160;            <a class="code" href="group__status__register.html#ga94588026849071dfdf4bacbdbf24976a">ADS1256_ACAL_BIT</a>, <a class="code" href="group__status__register.html#gacccdeffab4e1942cec3794851ef228c7">ADS1256_ACAL_SPAN</a>);</div>
<div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01299"></a><span class="lineno"> 1299</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Auto calibration setting: 0x%02X\n\r&quot;</span>, acal);</div>
<div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> acal;</div>
<div class="line"><a name="l01302"></a><span class="lineno"> 1302</span>&#160;}</div>
<div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>&#160;</div>
<div class="line"><a name="l01310"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gafb6c3c92ef11b050dfa33073e0347a4c"> 1310</a></span>&#160;<a class="code" href="group__ads1256__driver.html#ga12f71f8fc93fe63fb3c855ddd2070890">ADS1256_BUFFER_t</a> <a class="code" href="group__ads1256__driver.html#gafb6c3c92ef11b050dfa33073e0347a4c">ADS1256_GetInputBufferSetting</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01311"></a><span class="lineno"> 1311</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>);</div>
<div class="line"><a name="l01312"></a><span class="lineno"> 1312</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga12f71f8fc93fe63fb3c855ddd2070890">ADS1256_BUFFER_t</a> buffer = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>,</div>
<div class="line"><a name="l01313"></a><span class="lineno"> 1313</span>&#160;            <a class="code" href="group__status__register.html#ga2cbdb7cbaac91a12c2818e87b97a4906">ADS1256_BUFFEN_BIT</a>, <a class="code" href="group__status__register.html#gae477a7ad4b56f4a0579a674f5ef44d26">ADS1256_BUFFEN_SPAN</a>);</div>
<div class="line"><a name="l01314"></a><span class="lineno"> 1314</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01315"></a><span class="lineno"> 1315</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Input buffer setting: 0x%02X\n\r&quot;</span>, buffer);</div>
<div class="line"><a name="l01316"></a><span class="lineno"> 1316</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01317"></a><span class="lineno"> 1317</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> buffer;</div>
<div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>&#160;}</div>
<div class="line"><a name="l01319"></a><span class="lineno"> 1319</span>&#160;</div>
<div class="line"><a name="l01326"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga4131f935614bc1ea9eff4f0ec8b1cdfb"> 1326</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga4131f935614bc1ea9eff4f0ec8b1cdfb">ADS1256_SetDataOutputBitOrder</a>(<a class="code" href="group__ads1256__driver.html#ga3615e2e1ba70971dcdd5f7e54ffe5606">ADS1256_ORDER_t</a> order) {</div>
<div class="line"><a name="l01327"></a><span class="lineno"> 1327</span>&#160;    ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__status__register.html#ga295221d00dc4ae777c591ffdbc7f8922">ADS1256_ORDER_BIT</a>,</div>
<div class="line"><a name="l01328"></a><span class="lineno"> 1328</span>&#160;            <a class="code" href="group__status__register.html#gaa07ca51df9b9ce477186cf92d331a59c">ADS1256_ORDER_SPAN</a>, order);</div>
<div class="line"><a name="l01329"></a><span class="lineno"> 1329</span>&#160;}</div>
<div class="line"><a name="l01330"></a><span class="lineno"> 1330</span>&#160;</div>
<div class="line"><a name="l01337"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga7dbd4e23a723295a60adc8a7a97b9c5a"> 1337</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga7dbd4e23a723295a60adc8a7a97b9c5a">ADS1256_SetAutoCalSetting</a>(<a class="code" href="group__ads1256__driver.html#ga17864ca559c443a262068f0d19406113">ADS1256_ACAL_t</a> acal) {</div>
<div class="line"><a name="l01338"></a><span class="lineno"> 1338</span>&#160;    ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__status__register.html#ga94588026849071dfdf4bacbdbf24976a">ADS1256_ACAL_BIT</a>, <a class="code" href="group__status__register.html#gacccdeffab4e1942cec3794851ef228c7">ADS1256_ACAL_SPAN</a>, acal);</div>
<div class="line"><a name="l01339"></a><span class="lineno"> 1339</span>&#160;}</div>
<div class="line"><a name="l01340"></a><span class="lineno"> 1340</span>&#160;</div>
<div class="line"><a name="l01347"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga0d74a1bb54e74bd1ef8af302471d3905"> 1347</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga0d74a1bb54e74bd1ef8af302471d3905">ADS1256_SetInputBufferSetting</a>(<a class="code" href="group__ads1256__driver.html#ga12f71f8fc93fe63fb3c855ddd2070890">ADS1256_BUFFER_t</a> buffer) {</div>
<div class="line"><a name="l01348"></a><span class="lineno"> 1348</span>&#160;    ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__status__register.html#ga2cbdb7cbaac91a12c2818e87b97a4906">ADS1256_BUFFEN_BIT</a>,</div>
<div class="line"><a name="l01349"></a><span class="lineno"> 1349</span>&#160;            <a class="code" href="group__status__register.html#gae477a7ad4b56f4a0579a674f5ef44d26">ADS1256_BUFFEN_SPAN</a>, buffer);</div>
<div class="line"><a name="l01350"></a><span class="lineno"> 1350</span>&#160;}</div>
<div class="line"><a name="l01351"></a><span class="lineno"> 1351</span>&#160;</div>
<div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>&#160;</div>
<div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>&#160;</div>
<div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01355"></a><span class="lineno"> 1355</span>&#160;<span class="comment">/* MUX REGISTER METHODS */</span></div>
<div class="line"><a name="l01356"></a><span class="lineno"> 1356</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>&#160;</div>
<div class="line"><a name="l01364"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga9b6a25919b727c6e438f8bddf36f10b0"> 1364</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga9b6a25919b727c6e438f8bddf36f10b0">ADS1256_GetInputChannels</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea2652bd9dbe69551c508a9459a46de864">ADS1256_MUX</a>);</div>
<div class="line"><a name="l01366"></a><span class="lineno"> 1366</span>&#160;    uint8_t val = ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea2652bd9dbe69551c508a9459a46de864">ADS1256_MUX</a>);</div>
<div class="line"><a name="l01367"></a><span class="lineno"> 1367</span>&#160;    AIN_NEG = val &amp; 0x0F;</div>
<div class="line"><a name="l01368"></a><span class="lineno"> 1368</span>&#160;    AIN_POS = val &gt;&gt; 4;</div>
<div class="line"><a name="l01369"></a><span class="lineno"> 1369</span>&#160;}</div>
<div class="line"><a name="l01370"></a><span class="lineno"> 1370</span>&#160;</div>
<div class="line"><a name="l01378"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga2bf7d5627d8645de8b27842a006653bd"> 1378</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga2bf7d5627d8645de8b27842a006653bd">ADS1256_SetInputChannels</a>(<a class="code" href="group__ads1256__driver.html#ga7eac069c538033668b7baeca198def8f">ADS1256_AIN_t</a> pos, <a class="code" href="group__ads1256__driver.html#ga7eac069c538033668b7baeca198def8f">ADS1256_AIN_t</a> neg) {</div>
<div class="line"><a name="l01379"></a><span class="lineno"> 1379</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#ga655fb9a3125b65a0275bab57496008d3">IS_ADS1256_AIN_SETTING</a>(pos));</div>
<div class="line"><a name="l01380"></a><span class="lineno"> 1380</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#ga655fb9a3125b65a0275bab57496008d3">IS_ADS1256_AIN_SETTING</a>(neg));</div>
<div class="line"><a name="l01381"></a><span class="lineno"> 1381</span>&#160;    uint8_t reg = (uint8_t)((pos &lt;&lt; 4U) | neg);</div>
<div class="line"><a name="l01382"></a><span class="lineno"> 1382</span>&#160;    <span class="keywordflow">if</span> (ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea2652bd9dbe69551c508a9459a46de864">ADS1256_MUX</a>) != reg) { <span class="comment">/* If the register differs, then update it */</span></div>
<div class="line"><a name="l01383"></a><span class="lineno"> 1383</span>&#160;        ADS1256_SetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea2652bd9dbe69551c508a9459a46de864">ADS1256_MUX</a>, reg);</div>
<div class="line"><a name="l01384"></a><span class="lineno"> 1384</span>&#160;    }</div>
<div class="line"><a name="l01385"></a><span class="lineno"> 1385</span>&#160;}</div>
<div class="line"><a name="l01386"></a><span class="lineno"> 1386</span>&#160;</div>
<div class="line"><a name="l01387"></a><span class="lineno"> 1387</span>&#160;</div>
<div class="line"><a name="l01388"></a><span class="lineno"> 1388</span>&#160;</div>
<div class="line"><a name="l01389"></a><span class="lineno"> 1389</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01390"></a><span class="lineno"> 1390</span>&#160;<span class="comment">/* ADCON REGISTER METHODS */</span></div>
<div class="line"><a name="l01391"></a><span class="lineno"> 1391</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01392"></a><span class="lineno"> 1392</span>&#160;</div>
<div class="line"><a name="l01399"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga047a9418e182cce649f167169e3a72bf"> 1399</a></span>&#160;<a class="code" href="group__ads1256__driver.html#ga2d683909a58aa0617ee7c5d06d0a489f">ADS1256_CLOCK_OUT_t</a> <a class="code" href="group__ads1256__driver.html#ga047a9418e182cce649f167169e3a72bf">ADS1256_GetClockOutRate</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01400"></a><span class="lineno"> 1400</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a>);</div>
<div class="line"><a name="l01401"></a><span class="lineno"> 1401</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga2d683909a58aa0617ee7c5d06d0a489f">ADS1256_CLOCK_OUT_t</a> clock = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a>, <a class="code" href="group__adcon__register.html#ga5c128ef483f3f73486edc0926cfdd489">ADS1256_CO_BIT</a>, <a class="code" href="group__adcon__register.html#gaca76a3e75786c24c21dcc1f8b95d3c8f">ADS1256_CO_SPAN</a>);</div>
<div class="line"><a name="l01402"></a><span class="lineno"> 1402</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#ga33886a7717bd57bc4c1adc81dd78f4d5">IS_ADS1256_CLOCKOUT_SETTING</a>(clock));</div>
<div class="line"><a name="l01403"></a><span class="lineno"> 1403</span>&#160;    CLOCK_OUT = clock;</div>
<div class="line"><a name="l01404"></a><span class="lineno"> 1404</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01405"></a><span class="lineno"> 1405</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Clock out rate: 0x%02X\n\r&quot;</span>, clock);</div>
<div class="line"><a name="l01406"></a><span class="lineno"> 1406</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> clock;</div>
<div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>&#160;}</div>
<div class="line"><a name="l01409"></a><span class="lineno"> 1409</span>&#160;</div>
<div class="line"><a name="l01416"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga7ce3f5d5b256eeeba15bd2ad17c1010a"> 1416</a></span>&#160;<a class="code" href="group__ads1256__driver.html#gaa3102e98865ba4e72463676779cd62d4">ADS1256_SENSOR_DETECT_t</a> <a class="code" href="group__ads1256__driver.html#ga7ce3f5d5b256eeeba15bd2ad17c1010a">ADS1256_GetSensorDetectCurrent</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01417"></a><span class="lineno"> 1417</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a>);</div>
<div class="line"><a name="l01418"></a><span class="lineno"> 1418</span>&#160;    <a class="code" href="group__ads1256__driver.html#gaa3102e98865ba4e72463676779cd62d4">ADS1256_SENSOR_DETECT_t</a> current = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a>,</div>
<div class="line"><a name="l01419"></a><span class="lineno"> 1419</span>&#160;            <a class="code" href="group__adcon__register.html#gae9ac3d875a51151679aa3bb5de911286">ADS1256_SD_BIT</a>, <a class="code" href="group__adcon__register.html#ga7ccaedf1fc3255f7701cf9512d500a42">ADS1256_SD_SPAN</a>);</div>
<div class="line"><a name="l01420"></a><span class="lineno"> 1420</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#ga6b5e19fd414526c448625765505d8b8c">IS_ADS1256_SENSOR_DETECT_SETTING</a>(current));</div>
<div class="line"><a name="l01421"></a><span class="lineno"> 1421</span>&#160;    SENSOR_CURRENT = current;</div>
<div class="line"><a name="l01422"></a><span class="lineno"> 1422</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01423"></a><span class="lineno"> 1423</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Sensor detect current: 0x%02X\n\r&quot;</span>, current);</div>
<div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01425"></a><span class="lineno"> 1425</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> current;</div>
<div class="line"><a name="l01426"></a><span class="lineno"> 1426</span>&#160;}</div>
<div class="line"><a name="l01427"></a><span class="lineno"> 1427</span>&#160;</div>
<div class="line"><a name="l01434"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gab8cdcd9e7ab992e068f8b008c138f4e1"> 1434</a></span>&#160;<a class="code" href="group__ads1256__driver.html#gace2e231df7cd3598eb26d5ff51171701">ADS1256_PGA_t</a> <a class="code" href="group__ads1256__driver.html#gab8cdcd9e7ab992e068f8b008c138f4e1">ADS1256_GetPGASetting</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01435"></a><span class="lineno"> 1435</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a>);</div>
<div class="line"><a name="l01436"></a><span class="lineno"> 1436</span>&#160;    <a class="code" href="group__ads1256__driver.html#gace2e231df7cd3598eb26d5ff51171701">ADS1256_PGA_t</a> setting = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a>, <a class="code" href="group__adcon__register.html#ga331593eda0ade15ce934f8d2188e0f4f">ADS1256_PGA_BIT</a>, <a class="code" href="group__adcon__register.html#ga04102c89838c33a2da9fb44d71c9ce16">ADS1256_PGA_SPAN</a>);</div>
<div class="line"><a name="l01437"></a><span class="lineno"> 1437</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#gafbb63ded07f35a486351c82902a33b8c">IS_ADS1256_PGA_SETTING</a>(setting));</div>
<div class="line"><a name="l01438"></a><span class="lineno"> 1438</span>&#160;    PGA = setting;</div>
<div class="line"><a name="l01439"></a><span class="lineno"> 1439</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01440"></a><span class="lineno"> 1440</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] PGA Setting: 0x%02X\n\r&quot;</span>, setting);</div>
<div class="line"><a name="l01441"></a><span class="lineno"> 1441</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01442"></a><span class="lineno"> 1442</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> setting;</div>
<div class="line"><a name="l01443"></a><span class="lineno"> 1443</span>&#160;}</div>
<div class="line"><a name="l01444"></a><span class="lineno"> 1444</span>&#160;</div>
<div class="line"><a name="l01451"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga8354e6ff9be09b89afcac3c5fcbd3083"> 1451</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga8354e6ff9be09b89afcac3c5fcbd3083">ADS1256_SetClockOutRate</a>(<a class="code" href="group__ads1256__driver.html#ga2d683909a58aa0617ee7c5d06d0a489f">ADS1256_CLOCK_OUT_t</a> clock) {</div>
<div class="line"><a name="l01452"></a><span class="lineno"> 1452</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#ga33886a7717bd57bc4c1adc81dd78f4d5">IS_ADS1256_CLOCKOUT_SETTING</a>(clock));</div>
<div class="line"><a name="l01453"></a><span class="lineno"> 1453</span>&#160;    ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a>, <a class="code" href="group__adcon__register.html#ga5c128ef483f3f73486edc0926cfdd489">ADS1256_CO_BIT</a>, <a class="code" href="group__adcon__register.html#gaca76a3e75786c24c21dcc1f8b95d3c8f">ADS1256_CO_SPAN</a>, clock);</div>
<div class="line"><a name="l01454"></a><span class="lineno"> 1454</span>&#160;    CLOCK_OUT = clock;</div>
<div class="line"><a name="l01455"></a><span class="lineno"> 1455</span>&#160;}</div>
<div class="line"><a name="l01456"></a><span class="lineno"> 1456</span>&#160;</div>
<div class="line"><a name="l01462"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gae179dd8d2feace96c296cdff466225dc"> 1462</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#gae179dd8d2feace96c296cdff466225dc">ADS1256_SetSensorDetectCurrent</a>(<a class="code" href="group__ads1256__driver.html#gaa3102e98865ba4e72463676779cd62d4">ADS1256_SENSOR_DETECT_t</a> current) {</div>
<div class="line"><a name="l01463"></a><span class="lineno"> 1463</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#ga6b5e19fd414526c448625765505d8b8c">IS_ADS1256_SENSOR_DETECT_SETTING</a>(current));</div>
<div class="line"><a name="l01464"></a><span class="lineno"> 1464</span>&#160;    ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a>, <a class="code" href="group__adcon__register.html#gae9ac3d875a51151679aa3bb5de911286">ADS1256_SD_BIT</a>, <a class="code" href="group__adcon__register.html#ga7ccaedf1fc3255f7701cf9512d500a42">ADS1256_SD_SPAN</a>, current);</div>
<div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>&#160;    SENSOR_CURRENT = current;</div>
<div class="line"><a name="l01466"></a><span class="lineno"> 1466</span>&#160;}</div>
<div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>&#160;</div>
<div class="line"><a name="l01474"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gabd0d17a03fdddefb2d8cf04ad304a49d"> 1474</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#gabd0d17a03fdddefb2d8cf04ad304a49d">ADS1256_SetPGASetting</a>(<a class="code" href="group__ads1256__driver.html#gace2e231df7cd3598eb26d5ff51171701">ADS1256_PGA_t</a> gain) {</div>
<div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>&#160;    <span class="comment">/* Check the parameters */</span></div>
<div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#gafbb63ded07f35a486351c82902a33b8c">IS_ADS1256_PGA_SETTING</a>(gain));</div>
<div class="line"><a name="l01477"></a><span class="lineno"> 1477</span>&#160;    ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a>, <a class="code" href="group__adcon__register.html#ga331593eda0ade15ce934f8d2188e0f4f">ADS1256_PGA_BIT</a>, <a class="code" href="group__adcon__register.html#ga04102c89838c33a2da9fb44d71c9ce16">ADS1256_PGA_SPAN</a>, gain);</div>
<div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>&#160;    PGA = gain;</div>
<div class="line"><a name="l01479"></a><span class="lineno"> 1479</span>&#160;}</div>
<div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>&#160;</div>
<div class="line"><a name="l01487"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga853d2d710efae91bb12c6cb17d562459"> 1487</a></span>&#160;int32_t <a class="code" href="group__ads1256__driver.html#ga853d2d710efae91bb12c6cb17d562459">ADS1256_GetGainMultiplier</a>(<a class="code" href="group__ads1256__driver.html#gace2e231df7cd3598eb26d5ff51171701">ADS1256_PGA_t</a> gain) {</div>
<div class="line"><a name="l01488"></a><span class="lineno"> 1488</span>&#160;    int32_t retval = 1;</div>
<div class="line"><a name="l01489"></a><span class="lineno"> 1489</span>&#160;    <span class="keywordflow">switch</span> (gain) {</div>
<div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a>:</div>
<div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>&#160;        retval = 1;</div>
<div class="line"><a name="l01492"></a><span class="lineno"> 1492</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01493"></a><span class="lineno"> 1493</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a>:</div>
<div class="line"><a name="l01494"></a><span class="lineno"> 1494</span>&#160;        retval = 2;</div>
<div class="line"><a name="l01495"></a><span class="lineno"> 1495</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01496"></a><span class="lineno"> 1496</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a>:</div>
<div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>&#160;        retval = 4;</div>
<div class="line"><a name="l01498"></a><span class="lineno"> 1498</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a>:</div>
<div class="line"><a name="l01500"></a><span class="lineno"> 1500</span>&#160;        retval = 8;</div>
<div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a>:</div>
<div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>&#160;        retval = 16;</div>
<div class="line"><a name="l01504"></a><span class="lineno"> 1504</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a>:</div>
<div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>&#160;        retval = 32;</div>
<div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01508"></a><span class="lineno"> 1508</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a>:</div>
<div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>&#160;        retval = 64;</div>
<div class="line"><a name="l01510"></a><span class="lineno"> 1510</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01511"></a><span class="lineno"> 1511</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01512"></a><span class="lineno"> 1512</span>&#160;        retval = 1;</div>
<div class="line"><a name="l01513"></a><span class="lineno"> 1513</span>&#160;    }</div>
<div class="line"><a name="l01514"></a><span class="lineno"> 1514</span>&#160;    <span class="keywordflow">return</span> retval;</div>
<div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>&#160;}</div>
<div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>&#160;</div>
<div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>&#160;</div>
<div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>&#160;</div>
<div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>&#160;<span class="comment">/* DRATE REGISTER METHODS */</span></div>
<div class="line"><a name="l01521"></a><span class="lineno"> 1521</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>&#160;</div>
<div class="line"><a name="l01529"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gacf2f61cb43087ae7c270f00d24b27526"> 1529</a></span>&#160;<a class="code" href="group__ads1256__driver.html#gab0437f81aad031aadf3e05dd5fe0a731">ADS1256_SPS_t</a> <a class="code" href="group__ads1256__driver.html#gacf2f61cb43087ae7c270f00d24b27526">ADS1256_GetDataRate</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeacec171aa33aaa60cc213196342d75488">ADS1256_DRATE</a>);</div>
<div class="line"><a name="l01531"></a><span class="lineno"> 1531</span>&#160;    <a class="code" href="group__ads1256__driver.html#gab0437f81aad031aadf3e05dd5fe0a731">ADS1256_SPS_t</a> setting = ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeacec171aa33aaa60cc213196342d75488">ADS1256_DRATE</a>);</div>
<div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>&#160;    <span class="keywordflow">if</span> (setting) {</div>
<div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>&#160;        SPS = setting;</div>
<div class="line"><a name="l01534"></a><span class="lineno"> 1534</span>&#160;    }</div>
<div class="line"><a name="l01535"></a><span class="lineno"> 1535</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01536"></a><span class="lineno"> 1536</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Data rate: 0x%02X\n\r&quot;</span>, setting);</div>
<div class="line"><a name="l01537"></a><span class="lineno"> 1537</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> SPS;</div>
<div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>&#160;}</div>
<div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>&#160;</div>
<div class="line"><a name="l01547"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga14de02499be3d1dae8497b4e048b9568"> 1547</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga14de02499be3d1dae8497b4e048b9568">ADS1256_SetDataRate</a>(<a class="code" href="group__ads1256__driver.html#gab0437f81aad031aadf3e05dd5fe0a731">ADS1256_SPS_t</a> sps) {</div>
<div class="line"><a name="l01548"></a><span class="lineno"> 1548</span>&#160;    <span class="comment">/* Check the parameters */</span></div>
<div class="line"><a name="l01549"></a><span class="lineno"> 1549</span>&#160;    ADS1256_SetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeacec171aa33aaa60cc213196342d75488">ADS1256_DRATE</a>, sps);</div>
<div class="line"><a name="l01550"></a><span class="lineno"> 1550</span>&#160;    SPS = sps;</div>
<div class="line"><a name="l01551"></a><span class="lineno"> 1551</span>&#160;}</div>
<div class="line"><a name="l01552"></a><span class="lineno"> 1552</span>&#160;</div>
<div class="line"><a name="l01553"></a><span class="lineno"> 1553</span>&#160;</div>
<div class="line"><a name="l01554"></a><span class="lineno"> 1554</span>&#160;</div>
<div class="line"><a name="l01555"></a><span class="lineno"> 1555</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01556"></a><span class="lineno"> 1556</span>&#160;<span class="comment">/* GPIO REGISTER METHODS */</span></div>
<div class="line"><a name="l01557"></a><span class="lineno"> 1557</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>&#160;</div>
<div class="line"><a name="l01565"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gacc11f35703f43c395edb1e56c93d707f"> 1565</a></span>&#160;<a class="code" href="group__ads1256__driver.html#ga4df06f2662792cc9eff4ac7f97e35026">ADS1256_GPIO_DIRECTION_t</a> <a class="code" href="group__ads1256__driver.html#gacc11f35703f43c395edb1e56c93d707f">ADS1256_GetGPIODirection</a>(<a class="code" href="group__ads1256__driver.html#gaf55f2ff09e67223f3e5e0a6eb69de98b">ADS1256_GPIO_t</a> pin) {</div>
<div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeae03cf2e683ca72e093cbc79352b4d7ed">ADS1256_IO</a>);</div>
<div class="line"><a name="l01567"></a><span class="lineno"> 1567</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga4df06f2662792cc9eff4ac7f97e35026">ADS1256_GPIO_DIRECTION_t</a> dir = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeae03cf2e683ca72e093cbc79352b4d7ed">ADS1256_IO</a>, pin + <a class="code" href="group__io__register.html#ga79e29004c3a9381caf716a834ad58426">ADS1256_GPIO_DIR_OFFSET</a>, <a class="code" href="group__io__register.html#gaae5e18a5051bc2b7c8f7ff4237edae2a">ADS1256_GPIO_BIT_SPAN</a>);</div>
<div class="line"><a name="l01568"></a><span class="lineno"> 1568</span>&#160;    GPIO_DIRECTIONS[pin] = dir;</div>
<div class="line"><a name="l01569"></a><span class="lineno"> 1569</span>&#160;    <span class="keywordflow">return</span> dir;</div>
<div class="line"><a name="l01570"></a><span class="lineno"> 1570</span>&#160;}</div>
<div class="line"><a name="l01571"></a><span class="lineno"> 1571</span>&#160;</div>
<div class="line"><a name="l01578"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gaf864f2f518cd80873993a8f2ca073e27"> 1578</a></span>&#160;<a class="code" href="group__ads1256__driver.html#ga587084017ba4b239ffb8d90376921c2c">ADS1256_GPIO_STATUS_t</a> <a class="code" href="group__ads1256__driver.html#gaf864f2f518cd80873993a8f2ca073e27">ADS1256_GetGPIOStatus</a>(<a class="code" href="group__ads1256__driver.html#gaf55f2ff09e67223f3e5e0a6eb69de98b">ADS1256_GPIO_t</a> pin) {</div>
<div class="line"><a name="l01579"></a><span class="lineno"> 1579</span>&#160;    ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeae03cf2e683ca72e093cbc79352b4d7ed">ADS1256_IO</a>);</div>
<div class="line"><a name="l01580"></a><span class="lineno"> 1580</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga587084017ba4b239ffb8d90376921c2c">ADS1256_GPIO_STATUS_t</a> status = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeae03cf2e683ca72e093cbc79352b4d7ed">ADS1256_IO</a>, pin, <a class="code" href="group__io__register.html#gaae5e18a5051bc2b7c8f7ff4237edae2a">ADS1256_GPIO_BIT_SPAN</a>);</div>
<div class="line"><a name="l01581"></a><span class="lineno"> 1581</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#ga020698e4651ad6159ff7805f0a933562">IS_ADS1256_GPIO_VALUE</a>(status));</div>
<div class="line"><a name="l01582"></a><span class="lineno"> 1582</span>&#160;    GPIO_STATUS[pin] = status;</div>
<div class="line"><a name="l01583"></a><span class="lineno"> 1583</span>&#160;    <span class="keywordflow">return</span> status;</div>
<div class="line"><a name="l01584"></a><span class="lineno"> 1584</span>&#160;}</div>
<div class="line"><a name="l01585"></a><span class="lineno"> 1585</span>&#160;</div>
<div class="line"><a name="l01593"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#gacea1f1adb429508088a4a32029f90d00"> 1593</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#gacea1f1adb429508088a4a32029f90d00">ADS1256_SetGPIODirection</a>(<a class="code" href="group__ads1256__driver.html#gaf55f2ff09e67223f3e5e0a6eb69de98b">ADS1256_GPIO_t</a> pin, <a class="code" href="group__ads1256__driver.html#ga4df06f2662792cc9eff4ac7f97e35026">ADS1256_GPIO_DIRECTION_t</a> direction) {</div>
<div class="line"><a name="l01594"></a><span class="lineno"> 1594</span>&#160;    ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeae03cf2e683ca72e093cbc79352b4d7ed">ADS1256_IO</a>, pin + <a class="code" href="group__io__register.html#ga79e29004c3a9381caf716a834ad58426">ADS1256_GPIO_DIR_OFFSET</a>,<a class="code" href="group__io__register.html#gaae5e18a5051bc2b7c8f7ff4237edae2a">ADS1256_GPIO_BIT_SPAN</a>, direction);</div>
<div class="line"><a name="l01595"></a><span class="lineno"> 1595</span>&#160;    GPIO_DIRECTIONS[pin] = direction;</div>
<div class="line"><a name="l01596"></a><span class="lineno"> 1596</span>&#160;}</div>
<div class="line"><a name="l01597"></a><span class="lineno"> 1597</span>&#160;</div>
<div class="line"><a name="l01606"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga3285b54e967fbb817f071f9a1c455920"> 1606</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga3285b54e967fbb817f071f9a1c455920">ADS1256_SetGPIOStatus</a>(<a class="code" href="group__ads1256__driver.html#gaf55f2ff09e67223f3e5e0a6eb69de98b">ADS1256_GPIO_t</a> pin, <a class="code" href="group__ads1256__driver.html#ga587084017ba4b239ffb8d90376921c2c">ADS1256_GPIO_STATUS_t</a> status) {</div>
<div class="line"><a name="l01607"></a><span class="lineno"> 1607</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#ga020698e4651ad6159ff7805f0a933562">IS_ADS1256_GPIO_VALUE</a>(status));</div>
<div class="line"><a name="l01608"></a><span class="lineno"> 1608</span>&#160;    ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeae03cf2e683ca72e093cbc79352b4d7ed">ADS1256_IO</a>, pin, <a class="code" href="group__io__register.html#gaae5e18a5051bc2b7c8f7ff4237edae2a">ADS1256_GPIO_BIT_SPAN</a>, status);</div>
<div class="line"><a name="l01609"></a><span class="lineno"> 1609</span>&#160;    GPIO_STATUS[pin] = status;</div>
<div class="line"><a name="l01610"></a><span class="lineno"> 1610</span>&#160;}</div>
<div class="line"><a name="l01611"></a><span class="lineno"> 1611</span>&#160;</div>
<div class="line"><a name="l01612"></a><span class="lineno"> 1612</span>&#160;</div>
<div class="line"><a name="l01613"></a><span class="lineno"> 1613</span>&#160;</div>
<div class="line"><a name="l01614"></a><span class="lineno"> 1614</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01615"></a><span class="lineno"> 1615</span>&#160;<span class="comment">/* OFFSET CALIBRATION REGISTER METHODS */</span></div>
<div class="line"><a name="l01616"></a><span class="lineno"> 1616</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01617"></a><span class="lineno"> 1617</span>&#160;</div>
<div class="line"><a name="l01624"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga63ad5ddbb824fd07aedb6c0884db47eb"> 1624</a></span>&#160;uint32_t <a class="code" href="group__ads1256__driver.html#ga63ad5ddbb824fd07aedb6c0884db47eb">ADS1256_GetOffsetCalSetting</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01625"></a><span class="lineno"> 1625</span>&#160;    uint32_t setting = 0x00000000;</div>
<div class="line"><a name="l01626"></a><span class="lineno"> 1626</span>&#160;    uint32_t temp = 0x00000000;</div>
<div class="line"><a name="l01627"></a><span class="lineno"> 1627</span>&#160;    ADS1256_ReadRegisters(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaeb4092ff7d4d1de90200d3555a6e2c6c">ADS1256_OFC0</a>, 3);</div>
<div class="line"><a name="l01628"></a><span class="lineno"> 1628</span>&#160;    temp |= ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaf07570553a6f796ef337e5075dc30767">ADS1256_OFC2</a>);</div>
<div class="line"><a name="l01629"></a><span class="lineno"> 1629</span>&#160;    temp &lt;&lt;= 16;</div>
<div class="line"><a name="l01630"></a><span class="lineno"> 1630</span>&#160;    setting |= temp;</div>
<div class="line"><a name="l01631"></a><span class="lineno"> 1631</span>&#160;    temp = 0x00000000;</div>
<div class="line"><a name="l01632"></a><span class="lineno"> 1632</span>&#160;    temp |= ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaf21f5bd93a2140b83adfc26c55d5a9f5">ADS1256_OFC1</a>);</div>
<div class="line"><a name="l01633"></a><span class="lineno"> 1633</span>&#160;    temp &lt;&lt;= 8;</div>
<div class="line"><a name="l01634"></a><span class="lineno"> 1634</span>&#160;    setting |= temp;</div>
<div class="line"><a name="l01635"></a><span class="lineno"> 1635</span>&#160;    setting |= ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaeb4092ff7d4d1de90200d3555a6e2c6c">ADS1256_OFC0</a>);</div>
<div class="line"><a name="l01636"></a><span class="lineno"> 1636</span>&#160;    <span class="keywordflow">return</span> setting;</div>
<div class="line"><a name="l01637"></a><span class="lineno"> 1637</span>&#160;}</div>
<div class="line"><a name="l01638"></a><span class="lineno"> 1638</span>&#160;</div>
<div class="line"><a name="l01645"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga420b194968282731c912be5ccad0d30c"> 1645</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga420b194968282731c912be5ccad0d30c">ADS1256_SetOffsetCalSetting</a>(uint8_t* value) {</div>
<div class="line"><a name="l01646"></a><span class="lineno"> 1646</span>&#160;    ADS1256_SetRegisters(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaeb4092ff7d4d1de90200d3555a6e2c6c">ADS1256_OFC0</a>, 3, value);</div>
<div class="line"><a name="l01647"></a><span class="lineno"> 1647</span>&#160;}</div>
<div class="line"><a name="l01648"></a><span class="lineno"> 1648</span>&#160;</div>
<div class="line"><a name="l01649"></a><span class="lineno"> 1649</span>&#160;</div>
<div class="line"><a name="l01650"></a><span class="lineno"> 1650</span>&#160;</div>
<div class="line"><a name="l01651"></a><span class="lineno"> 1651</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01652"></a><span class="lineno"> 1652</span>&#160;<span class="comment">/* GAIN CALIBRATION REGISTER METHODS */</span></div>
<div class="line"><a name="l01653"></a><span class="lineno"> 1653</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01654"></a><span class="lineno"> 1654</span>&#160;</div>
<div class="line"><a name="l01661"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga06c5d4c98c45514224e4f494b2618221"> 1661</a></span>&#160;uint32_t <a class="code" href="group__ads1256__driver.html#ga06c5d4c98c45514224e4f494b2618221">ADS1256_GetGainCalSetting</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01662"></a><span class="lineno"> 1662</span>&#160;    uint32_t setting = 0x00000000;</div>
<div class="line"><a name="l01663"></a><span class="lineno"> 1663</span>&#160;    uint32_t temp = 0x00000000;</div>
<div class="line"><a name="l01664"></a><span class="lineno"> 1664</span>&#160;    ADS1256_ReadRegisters(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaa0f2a3e21e4efa92857623a7283cfdd1">ADS1256_FSC0</a>, 3);</div>
<div class="line"><a name="l01665"></a><span class="lineno"> 1665</span>&#160;    temp |= ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea546b556453240d6fcf14f818575e4e00">ADS1256_FSC2</a>);</div>
<div class="line"><a name="l01666"></a><span class="lineno"> 1666</span>&#160;    temp &lt;&lt;= 16;</div>
<div class="line"><a name="l01667"></a><span class="lineno"> 1667</span>&#160;    setting |= temp;</div>
<div class="line"><a name="l01668"></a><span class="lineno"> 1668</span>&#160;    temp = 0x00000000;</div>
<div class="line"><a name="l01669"></a><span class="lineno"> 1669</span>&#160;    temp |= ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaf24fb3090a15c8ec37e8920054076b33">ADS1256_FSC1</a>);</div>
<div class="line"><a name="l01670"></a><span class="lineno"> 1670</span>&#160;    temp &lt;&lt;= 8;</div>
<div class="line"><a name="l01671"></a><span class="lineno"> 1671</span>&#160;    setting |= temp;</div>
<div class="line"><a name="l01672"></a><span class="lineno"> 1672</span>&#160;    setting |= ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaa0f2a3e21e4efa92857623a7283cfdd1">ADS1256_FSC0</a>);</div>
<div class="line"><a name="l01673"></a><span class="lineno"> 1673</span>&#160;    <span class="keywordflow">return</span> setting;</div>
<div class="line"><a name="l01674"></a><span class="lineno"> 1674</span>&#160;}</div>
<div class="line"><a name="l01675"></a><span class="lineno"> 1675</span>&#160;</div>
<div class="line"><a name="l01682"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga87d92ada1f9826aabe9e4b330e9edbef"> 1682</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga87d92ada1f9826aabe9e4b330e9edbef">ADS1256_SetGainCalSetting</a>(uint8_t* value) {</div>
<div class="line"><a name="l01683"></a><span class="lineno"> 1683</span>&#160;    ADS1256_SetRegisters(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaa0f2a3e21e4efa92857623a7283cfdd1">ADS1256_FSC0</a>, 3, value);</div>
<div class="line"><a name="l01684"></a><span class="lineno"> 1684</span>&#160;}</div>
<div class="line"><a name="l01685"></a><span class="lineno"> 1685</span>&#160;</div>
<div class="line"><a name="l01686"></a><span class="lineno"> 1686</span>&#160;</div>
<div class="line"><a name="l01687"></a><span class="lineno"> 1687</span>&#160;</div>
<div class="line"><a name="l01688"></a><span class="lineno"> 1688</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01689"></a><span class="lineno"> 1689</span>&#160;<span class="comment">/* COMMAND METHODS */</span></div>
<div class="line"><a name="l01690"></a><span class="lineno"> 1690</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01691"></a><span class="lineno"> 1691</span>&#160;</div>
<div class="line"><a name="l01700"></a><span class="lineno"> 1700</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_Reg_Command(<a class="code" href="group__ads1256__driver.html#gadb203fb3b246881a33160b5b25822d42">ADS1256_Command_t</a> cmd, <a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t count) {</div>
<div class="line"><a name="l01701"></a><span class="lineno"> 1701</span>&#160;    assert_param(<a class="code" href="group__ads1256__driver.html#ga55a9f5e79ef35937961a7ec254558010">IS_ADS1256_REGISTER_COMMAND</a>(cmd));</div>
<div class="line"><a name="l01702"></a><span class="lineno"> 1702</span>&#160;    uint8_t cmds[] = { (cmd | reg), 0x0F &amp; (count - 1) };</div>
<div class="line"><a name="l01703"></a><span class="lineno"> 1703</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga0eecf15939442deb9f23a1f9758539f9">ADS1256_SendBytes</a>(cmds, 2);</div>
<div class="line"><a name="l01704"></a><span class="lineno"> 1704</span>&#160;}</div>
<div class="line"><a name="l01705"></a><span class="lineno"> 1705</span>&#160;</div>
<div class="line"><a name="l01712"></a><span class="lineno"> 1712</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_Send_Command(<a class="code" href="group__ads1256__driver.html#gadb203fb3b246881a33160b5b25822d42">ADS1256_Command_t</a> cmd) {</div>
<div class="line"><a name="l01713"></a><span class="lineno"> 1713</span>&#160;    ADS1256_CS_LOW();</div>
<div class="line"><a name="l01714"></a><span class="lineno"> 1714</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga81371e39460504d1badd6291ef5ba2f7">ADS1256_SendByte</a>(cmd);</div>
<div class="line"><a name="l01715"></a><span class="lineno"> 1715</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga0c9c039ac03ad1280102b1f05c056071">ADS1256_CS_HIGH</a>();</div>
<div class="line"><a name="l01716"></a><span class="lineno"> 1716</span>&#160;}</div>
<div class="line"><a name="l01717"></a><span class="lineno"> 1717</span>&#160;</div>
<div class="line"><a name="l01718"></a><span class="lineno"> 1718</span>&#160;</div>
<div class="line"><a name="l01719"></a><span class="lineno"> 1719</span>&#160;</div>
<div class="line"><a name="l01720"></a><span class="lineno"> 1720</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01721"></a><span class="lineno"> 1721</span>&#160;<span class="comment">/* REGISTER METHODS */</span></div>
<div class="line"><a name="l01722"></a><span class="lineno"> 1722</span>&#160;<span class="comment">/*--------------------------------------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l01723"></a><span class="lineno"> 1723</span>&#160;</div>
<div class="line"><a name="l01732"></a><span class="lineno"> 1732</span>&#160;<span class="keyword">static</span> uint8_t ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t index, uint8_t count) {</div>
<div class="line"><a name="l01733"></a><span class="lineno"> 1733</span>&#160;    uint8_t byte = ADS1256_GetRegister(reg);</div>
<div class="line"><a name="l01734"></a><span class="lineno"> 1734</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01735"></a><span class="lineno"> 1735</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Get register bits (Register %6s, Index: %i, Count: %i): Original 0x%02X\n\r&quot;</span>, ADS1256_StringFromRegister(reg), index, count, byte);</div>
<div class="line"><a name="l01736"></a><span class="lineno"> 1736</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01737"></a><span class="lineno"> 1737</span>&#160;<span class="preprocessor"></span>    uint8_t mask = (uint8_t) (0xFFU &gt;&gt; (8U - count));</div>
<div class="line"><a name="l01738"></a><span class="lineno"> 1738</span>&#160;    byte = (byte &gt;&gt; index) &amp; mask;</div>
<div class="line"><a name="l01739"></a><span class="lineno"> 1739</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01740"></a><span class="lineno"> 1740</span>&#160;<span class="preprocessor"></span>    printf(<span class="stringliteral">&quot;[ADS1256] Register bits after 0x%02X\n\r&quot;</span>, byte);</div>
<div class="line"><a name="l01741"></a><span class="lineno"> 1741</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01742"></a><span class="lineno"> 1742</span>&#160;<span class="preprocessor"></span>    <span class="keywordflow">return</span> byte;</div>
<div class="line"><a name="l01743"></a><span class="lineno"> 1743</span>&#160;}</div>
<div class="line"><a name="l01744"></a><span class="lineno"> 1744</span>&#160;</div>
<div class="line"><a name="l01754"></a><span class="lineno"> 1754</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_SetRegisterBits(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t index, uint8_t count, uint8_t value) {</div>
<div class="line"><a name="l01755"></a><span class="lineno"> 1755</span>&#160;    <span class="comment">/* Ensure that the count will not overrun the register */</span></div>
<div class="line"><a name="l01756"></a><span class="lineno"> 1756</span>&#160;    <span class="keywordflow">if</span> ((count - index) &gt;= 8U) {</div>
<div class="line"><a name="l01757"></a><span class="lineno"> 1757</span>&#160;        count = 7U - index;</div>
<div class="line"><a name="l01758"></a><span class="lineno"> 1758</span>&#160;    }</div>
<div class="line"><a name="l01759"></a><span class="lineno"> 1759</span>&#160;    <span class="comment">/* Ensure that there is no extraneous data in value */</span></div>
<div class="line"><a name="l01760"></a><span class="lineno"> 1760</span>&#160;    value &amp;= ~(0xFF &lt;&lt; count);</div>
<div class="line"><a name="l01761"></a><span class="lineno"> 1761</span>&#160;    <span class="comment">/* Get the most recent value of the register */</span></div>
<div class="line"><a name="l01762"></a><span class="lineno"> 1762</span>&#160;    uint8_t byte = ADS1256_GetRegister(reg);</div>
<div class="line"><a name="l01763"></a><span class="lineno"> 1763</span>&#160;    <span class="comment">/* If the value to be set is identical to the existing one, no action. */</span></div>
<div class="line"><a name="l01764"></a><span class="lineno"> 1764</span>&#160;    <span class="keywordflow">if</span> (ADS1256_GetRegisterBits(reg, index, count) == value) {</div>
<div class="line"><a name="l01765"></a><span class="lineno"> 1765</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l01766"></a><span class="lineno"> 1766</span>&#160;    }</div>
<div class="line"><a name="l01767"></a><span class="lineno"> 1767</span>&#160;    uint8_t mask = 0x00;</div>
<div class="line"><a name="l01768"></a><span class="lineno"> 1768</span>&#160;    <span class="keywordflow">for</span> (uint_fast8_t i = 0; i &lt; count; ++i) {</div>
<div class="line"><a name="l01769"></a><span class="lineno"> 1769</span>&#160;        mask |= 0x01 &lt;&lt; (index + i);</div>
<div class="line"><a name="l01770"></a><span class="lineno"> 1770</span>&#160;    }</div>
<div class="line"><a name="l01771"></a><span class="lineno"> 1771</span>&#160;    <span class="comment">//uint8_t mask = (uint8_t)((0xFFU &gt;&gt; count) &lt;&lt; index); /* Create the mask, all 1&#39;s shifted left by the starting bit index */</span></div>
<div class="line"><a name="l01772"></a><span class="lineno"> 1772</span>&#160;    byte = (byte &amp; ~mask) | (value &lt;&lt; index);</div>
<div class="line"><a name="l01773"></a><span class="lineno"> 1773</span>&#160;    ADS1256_SetRegister(reg, byte);</div>
<div class="line"><a name="l01774"></a><span class="lineno"> 1774</span>&#160;}</div>
<div class="line"><a name="l01775"></a><span class="lineno"> 1775</span>&#160;</div>
<div class="line"><a name="l01783"></a><span class="lineno"> 1783</span>&#160;<span class="keyword">static</span> uint8_t ADS1256_GetRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg) {</div>
<div class="line"><a name="l01784"></a><span class="lineno"> 1784</span>&#160;    <span class="keywordflow">return</span> ADS1256_Registers[reg];</div>
<div class="line"><a name="l01785"></a><span class="lineno"> 1785</span>&#160;}</div>
<div class="line"><a name="l01786"></a><span class="lineno"> 1786</span>&#160;</div>
<div class="line"><a name="l01794"></a><span class="lineno"> 1794</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_SetRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t value) {</div>
<div class="line"><a name="l01795"></a><span class="lineno"> 1795</span>&#160;    ADS1256_SetRegisters(reg, 1, &amp;value);</div>
<div class="line"><a name="l01796"></a><span class="lineno"> 1796</span>&#160;}</div>
<div class="line"><a name="l01797"></a><span class="lineno"> 1797</span>&#160;</div>
<div class="line"><a name="l01806"></a><span class="lineno"> 1806</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_SetRegisters(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t count, uint8_t* values) {</div>
<div class="line"><a name="l01807"></a><span class="lineno"> 1807</span>&#160;    <span class="keywordflow">for</span> (uint_fast8_t i = 0; i &lt; count; ++i) {</div>
<div class="line"><a name="l01808"></a><span class="lineno"> 1808</span>&#160;        ADS1256_Registers[reg + i] = values[i];</div>
<div class="line"><a name="l01809"></a><span class="lineno"> 1809</span>&#160;    }</div>
<div class="line"><a name="l01810"></a><span class="lineno"> 1810</span>&#160;    ADS1256_WriteRegisters(reg, count);</div>
<div class="line"><a name="l01811"></a><span class="lineno"> 1811</span>&#160;}</div>
<div class="line"><a name="l01812"></a><span class="lineno"> 1812</span>&#160;</div>
<div class="line"><a name="l01819"></a><span class="lineno"> 1819</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_ReadRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg) {</div>
<div class="line"><a name="l01820"></a><span class="lineno"> 1820</span>&#160;    ADS1256_ReadRegisters(reg, 1);</div>
<div class="line"><a name="l01821"></a><span class="lineno"> 1821</span>&#160;}</div>
<div class="line"><a name="l01822"></a><span class="lineno"> 1822</span>&#160;</div>
<div class="line"><a name="l01830"></a><span class="lineno"> 1830</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_ReadRegisters(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t count) {</div>
<div class="line"><a name="l01831"></a><span class="lineno"> 1831</span>&#160;    ADS1256_CS_LOW();</div>
<div class="line"><a name="l01832"></a><span class="lineno"> 1832</span>&#160;    ADS1256_Reg_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42aee3ef8f7acb16ce684bfd531f1c79ab6">ADS1256_RREG</a>, reg, count);</div>
<div class="line"><a name="l01833"></a><span class="lineno"> 1833</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>(50 * ADS1256_CLK_PERIOD_US); <span class="comment">/* timing characteristic t6 */</span></div>
<div class="line"><a name="l01834"></a><span class="lineno"> 1834</span>&#160;    <a class="code" href="group__ads1256__driver.html#gadadfc4d298fad4e9833975340b7eeaae">ADS1256_ReceiveBytes</a>(ADS1256_Registers + reg, count);</div>
<div class="line"><a name="l01835"></a><span class="lineno"> 1835</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga0c9c039ac03ad1280102b1f05c056071">ADS1256_CS_HIGH</a>();</div>
<div class="line"><a name="l01836"></a><span class="lineno"> 1836</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>(4 * ADS1256_CLK_PERIOD_US); <span class="comment">/* timing characteristic t11 */</span></div>
<div class="line"><a name="l01837"></a><span class="lineno"> 1837</span>&#160;    <span class="keywordflow">if</span> (reg == <a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>) {</div>
<div class="line"><a name="l01838"></a><span class="lineno"> 1838</span>&#160;        <span class="comment">/* We just read the status register, lets make sure things match up */</span></div>
<div class="line"><a name="l01839"></a><span class="lineno"> 1839</span>&#160;        <span class="keywordflow">if</span> (ID == 0xFF) {</div>
<div class="line"><a name="l01840"></a><span class="lineno"> 1840</span>&#160;            <span class="comment">/* This is the first read */</span></div>
<div class="line"><a name="l01841"></a><span class="lineno"> 1841</span>&#160;            ID = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>, <a class="code" href="group__status__register.html#ga14da33a69f54e320a00c3e33e9dcf44a">ADS1256_ID_BIT</a>, <a class="code" href="group__status__register.html#ga4b89c536e185cfdbd9fa248a3e3772b7">ADS1256_ID_SPAN</a>);</div>
<div class="line"><a name="l01842"></a><span class="lineno"> 1842</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01843"></a><span class="lineno"> 1843</span>&#160;<span class="preprocessor"></span>            printf(<span class="stringliteral">&quot;[ADS1256] Setting ADC ID: 0x%02X\n\r&quot;</span>, ID);</div>
<div class="line"><a name="l01844"></a><span class="lineno"> 1844</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01845"></a><span class="lineno"> 1845</span>&#160;<span class="preprocessor"></span>        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l01846"></a><span class="lineno"> 1846</span>&#160;            <span class="comment">/* This is a subsequent read */</span></div>
<div class="line"><a name="l01847"></a><span class="lineno"> 1847</span>&#160;            uint8_t tempID = ADS1256_GetRegisterBits(<a class="code" href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a>,</div>
<div class="line"><a name="l01848"></a><span class="lineno"> 1848</span>&#160;                    <a class="code" href="group__status__register.html#ga14da33a69f54e320a00c3e33e9dcf44a">ADS1256_ID_BIT</a>, <a class="code" href="group__status__register.html#ga4b89c536e185cfdbd9fa248a3e3772b7">ADS1256_ID_SPAN</a>);</div>
<div class="line"><a name="l01849"></a><span class="lineno"> 1849</span>&#160;            <span class="keywordflow">if</span> (tempID != ID) {</div>
<div class="line"><a name="l01850"></a><span class="lineno"> 1850</span>&#160;                <span class="comment">/* There was a problem, reset the ADC */</span></div>
<div class="line"><a name="l01851"></a><span class="lineno"> 1851</span>&#160;<span class="preprocessor">#ifdef ADS1256_DEBUG</span></div>
<div class="line"><a name="l01852"></a><span class="lineno"> 1852</span>&#160;<span class="preprocessor"></span>                printf(<span class="stringliteral">&quot;[ADS1256] The ADC did not return the same ID, resetting and reprogramming it.\n\r&quot;</span>);</div>
<div class="line"><a name="l01853"></a><span class="lineno"> 1853</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l01854"></a><span class="lineno"> 1854</span>&#160;<span class="preprocessor"></span>                <a class="code" href="group__ads1256__driver.html#ga16dbb214bb63f6051170ee4f8964beb6">ADS1256_ResetAndReprogram</a>();</div>
<div class="line"><a name="l01855"></a><span class="lineno"> 1855</span>&#160;            }</div>
<div class="line"><a name="l01856"></a><span class="lineno"> 1856</span>&#160;        }</div>
<div class="line"><a name="l01857"></a><span class="lineno"> 1857</span>&#160;    }</div>
<div class="line"><a name="l01858"></a><span class="lineno"> 1858</span>&#160;}</div>
<div class="line"><a name="l01859"></a><span class="lineno"> 1859</span>&#160;</div>
<div class="line"><a name="l01866"></a><span class="lineno"> 1866</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_WriteRegister(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg) {</div>
<div class="line"><a name="l01867"></a><span class="lineno"> 1867</span>&#160;    ADS1256_WriteRegisters(reg, 1);</div>
<div class="line"><a name="l01868"></a><span class="lineno"> 1868</span>&#160;}</div>
<div class="line"><a name="l01869"></a><span class="lineno"> 1869</span>&#160;</div>
<div class="line"><a name="l01877"></a><span class="lineno"> 1877</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> ADS1256_WriteRegisters(<a class="code" href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a> reg, uint8_t count) {</div>
<div class="line"><a name="l01878"></a><span class="lineno"> 1878</span>&#160;    ADS1256_CS_LOW();</div>
<div class="line"><a name="l01879"></a><span class="lineno"> 1879</span>&#160;    ADS1256_Reg_Command(<a class="code" href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a15d3f34090137e08b2a38765214a1153">ADS1256_WREG</a>, reg, count);</div>
<div class="line"><a name="l01880"></a><span class="lineno"> 1880</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>(50 * ADS1256_CLK_PERIOD_US); <span class="comment">/* timing characteristic t6 */</span></div>
<div class="line"><a name="l01881"></a><span class="lineno"> 1881</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga0eecf15939442deb9f23a1f9758539f9">ADS1256_SendBytes</a>(ADS1256_Registers + reg, count);</div>
<div class="line"><a name="l01882"></a><span class="lineno"> 1882</span>&#160;    <a class="code" href="group__ads1256__driver.html#ga0c9c039ac03ad1280102b1f05c056071">ADS1256_CS_HIGH</a>();</div>
<div class="line"><a name="l01883"></a><span class="lineno"> 1883</span>&#160;    <a class="code" href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a>(4 * ADS1256_CLK_PERIOD_US); <span class="comment">/* timing characteristic t11 */</span></div>
<div class="line"><a name="l01884"></a><span class="lineno"> 1884</span>&#160;}</div>
<div class="line"><a name="l01885"></a><span class="lineno"> 1885</span>&#160;</div>
<div class="line"><a name="l01892"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga525f292542208f8309ee79c912b77334"> 1892</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga525f292542208f8309ee79c912b77334">ADS1256_SCLK_LOW</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01893"></a><span class="lineno"> 1893</span>&#160;    GPIO_ResetBits(ADS1256_SPI_SCK_GPIO_PORT, ADS1256_SPI_SCK_PIN );</div>
<div class="line"><a name="l01894"></a><span class="lineno"> 1894</span>&#160;}</div>
<div class="line"><a name="l01895"></a><span class="lineno"> 1895</span>&#160;</div>
<div class="line"><a name="l01902"></a><span class="lineno"><a class="line" href="group__ads1256__driver.html#ga13b51a0fb626ff6f592fc7ce425e8046"> 1902</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__ads1256__driver.html#ga13b51a0fb626ff6f592fc7ce425e8046">ADS1256_SCLK_HIGH</a>(<span class="keywordtype">void</span>) {</div>
<div class="line"><a name="l01903"></a><span class="lineno"> 1903</span>&#160;    GPIO_SetBits(ADS1256_SPI_SCK_GPIO_PORT, ADS1256_SPI_SCK_PIN );</div>
<div class="line"><a name="l01904"></a><span class="lineno"> 1904</span>&#160;}</div>
<div class="ttc" id="group__ads1256__driver_html_gadadfc4d298fad4e9833975340b7eeaae"><div class="ttname"><a href="group__ads1256__driver.html#gadadfc4d298fad4e9833975340b7eeaae">ADS1256_ReceiveBytes</a></div><div class="ttdeci">void ADS1256_ReceiveBytes(uint8_t *data, uint8_t n)</div><div class="ttdoc">Receive an array of bytes over the SPI line. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___s_p_i___controller_8c_source.html#l00308">ADS1256_SPI_Controller.c:308</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731a5146cfab8c3f5a4229a192d7f6c75fee"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a5146cfab8c3f5a4229a192d7f6c75fee">ADS1256_SPS_50</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00372">ADS1256_Driver.h:372</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42a4fba878e65192a50066360cc328630c6"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a4fba878e65192a50066360cc328630c6">ADS1256_RDATA</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00495">ADS1256_Driver.h:495</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga5fb186f2113df3c976ae00debb6095d7"><div class="ttname"><a href="group__ads1256__driver.html#ga5fb186f2113df3c976ae00debb6095d7">ADS1256_Reset_SPI</a></div><div class="ttdeci">void ADS1256_Reset_SPI(void)</div><div class="ttdoc">Reset the ADS1256 ADC SPI port. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00628">ADS1256_Driver.c:628</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdeacec171aa33aaa60cc213196342d75488"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeacec171aa33aaa60cc213196342d75488">ADS1256_DRATE</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00459">ADS1256_Driver.h:459</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga4df06f2662792cc9eff4ac7f97e35026aeb27500675e6a6c77bf127853092a6e7"><div class="ttname"><a href="group__ads1256__driver.html#gga4df06f2662792cc9eff4ac7f97e35026aeb27500675e6a6c77bf127853092a6e7">ADS1256_GPIO_OUTPUT</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00421">ADS1256_Driver.h:421</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggaa3102e98865ba4e72463676779cd62d4a916890dc39cbdbb4bc7eb2b83df10810"><div class="ttname"><a href="group__ads1256__driver.html#ggaa3102e98865ba4e72463676779cd62d4a916890dc39cbdbb4bc7eb2b83df10810">ADS1256_SD_OFF</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00312">ADS1256_Driver.h:312</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea861808fe9ebfaefd3b40f35d785f76ad">ADS1256_STATUS</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00456">ADS1256_Driver.h:456</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609"><div class="ttname"><a href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a754ed5e91f3b93223b05f37e9614d609">ADS1256_PGAx4</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00334">ADS1256_Driver.h:334</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdeaf21f5bd93a2140b83adfc26c55d5a9f5"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaf21f5bd93a2140b83adfc26c55d5a9f5">ADS1256_OFC1</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00462">ADS1256_Driver.h:462</a></div></div>
<div class="ttc" id="group__adcon__register_html_ga04102c89838c33a2da9fb44d71c9ce16"><div class="ttname"><a href="group__adcon__register.html#ga04102c89838c33a2da9fb44d71c9ce16">ADS1256_PGA_SPAN</a></div><div class="ttdeci">#define ADS1256_PGA_SPAN</div><div class="ttdoc">The programmable gain amplifier setting bit count in the ADCON register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00175">ADS1256_Driver.h:175</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gafab91604ac5588b9c626bb7e050f0774"><div class="ttname"><a href="group__ads1256__driver.html#gafab91604ac5588b9c626bb7e050f0774">ADS1256_StringFromBuffer</a></div><div class="ttdeci">const char * ADS1256_StringFromBuffer(ADS1256_BUFFER_t buffer)</div><div class="ttdoc">Return the human readable string representation of the provided buffer setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00442">ADS1256_Driver.c:442</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42aee3ef8f7acb16ce684bfd531f1c79ab6"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42aee3ef8f7acb16ce684bfd531f1c79ab6">ADS1256_RREG</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00498">ADS1256_Driver.h:498</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42a16dda7b760f74ca18488460f89193303"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a16dda7b760f74ca18488460f89193303">ADS1256_SYNC</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00505">ADS1256_Driver.h:505</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a81215671a55d86226c4ac6c931d9dfa3">ADS1256_SPS_30000</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00363">ADS1256_Driver.h:363</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga7b012a2ab6b0494da4e1297e34ab9925"><div class="ttname"><a href="group__ads1256__driver.html#ga7b012a2ab6b0494da4e1297e34ab9925">ADS1256_Full_Reset</a></div><div class="ttdeci">void ADS1256_Full_Reset(void)</div><div class="ttdoc">Completely reset the ADS1256 ADC. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00557">ADS1256_Driver.c:557</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc"><div class="ttname"><a href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701acb36c0b12e2f4f18a074dbbe34f9cbcc">ADS1256_PGAx16</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00336">ADS1256_Driver.h:336</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gadb203fb3b246881a33160b5b25822d42"><div class="ttname"><a href="group__ads1256__driver.html#gadb203fb3b246881a33160b5b25822d42">ADS1256_Command_t</a></div><div class="ttdeci">ADS1256_Command_t</div><div class="ttdoc">ADS1256 command enumeration. Defines the commands which the ADS1256 ADC understands. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00493">ADS1256_Driver.h:493</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga5a915f192a268c5737f34dcbe2859524"><div class="ttname"><a href="group__ads1256__driver.html#ga5a915f192a268c5737f34dcbe2859524">ADS1256_Standby</a></div><div class="ttdeci">void ADS1256_Standby(void)</div><div class="ttdoc">Put the ADC into STANDBY mode. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00802">ADS1256_Driver.c:802</a></div></div>
<div class="ttc" id="_a_d_s1256___driver_8c_html_ab81fe3f8a82390e44e042f351df3f59c"><div class="ttname"><a href="_a_d_s1256___driver_8c.html#ab81fe3f8a82390e44e042f351df3f59c">ADS1256_NEGATIVE_PADDING</a></div><div class="ttdeci">#define ADS1256_NEGATIVE_PADDING</div><div class="ttdoc">Used to pad a 24 bit unsigned int which represents a 2&#39;s compliment negative number to a 32 bit int...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00058">ADS1256_Driver.c:58</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga3285b54e967fbb817f071f9a1c455920"><div class="ttname"><a href="group__ads1256__driver.html#ga3285b54e967fbb817f071f9a1c455920">ADS1256_SetGPIOStatus</a></div><div class="ttdeci">void ADS1256_SetGPIOStatus(ADS1256_GPIO_t pin, ADS1256_GPIO_STATUS_t status)</div><div class="ttdoc">Set the state of a GPIO pin. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01606">ADS1256_Driver.c:1606</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604"><div class="ttname"><a href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a89a612ad300d0abb0ab2c73f43610604">ADS1256_PGAx64</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00338">ADS1256_Driver.h:338</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gace2e231df7cd3598eb26d5ff51171701"><div class="ttname"><a href="group__ads1256__driver.html#gace2e231df7cd3598eb26d5ff51171701">ADS1256_PGA_t</a></div><div class="ttdeci">ADS1256_PGA_t</div><div class="ttdoc">Programmable gain amplifier gain setting enumeration. Defines the different possible gain settings of...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00331">ADS1256_Driver.h:331</a></div></div>
<div class="ttc" id="group__status__register_html_ga14da33a69f54e320a00c3e33e9dcf44a"><div class="ttname"><a href="group__status__register.html#ga14da33a69f54e320a00c3e33e9dcf44a">ADS1256_ID_BIT</a></div><div class="ttdeci">#define ADS1256_ID_BIT</div><div class="ttdoc">The factory programmed ID bit starting position in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00120">ADS1256_Driver.h:120</a></div></div>
<div class="ttc" id="group__tekdaqc__timers_html_gaf7d18dc0155f873c4ed1d149e6060d19"><div class="ttname"><a href="group__tekdaqc__timers.html#gaf7d18dc0155f873c4ed1d149e6060d19">Delay_ms</a></div><div class="ttdeci">void Delay_ms(float ms)</div><div class="ttdoc">Blocking delay, measured in fractional milliseconds. </div><div class="ttdef"><b>Definition:</b> <a href="_tekdaqc___timers_8c_source.html#l00122">Tekdaqc_Timers.c:122</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gaf864f2f518cd80873993a8f2ca073e27"><div class="ttname"><a href="group__ads1256__driver.html#gaf864f2f518cd80873993a8f2ca073e27">ADS1256_GetGPIOStatus</a></div><div class="ttdeci">ADS1256_GPIO_STATUS_t ADS1256_GetGPIOStatus(ADS1256_GPIO_t pin)</div><div class="ttdoc">Retrieve the current state of a GPIO pin. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01578">ADS1256_Driver.c:1578</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga12f71f8fc93fe63fb3c855ddd2070890"><div class="ttname"><a href="group__ads1256__driver.html#ga12f71f8fc93fe63fb3c855ddd2070890">ADS1256_BUFFER_t</a></div><div class="ttdeci">ADS1256_BUFFER_t</div><div class="ttdoc">Analog input buffer flag enumeration. Defines the two possible states of the ADS1256 analog input buf...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00226">ADS1256_Driver.h:226</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga9b6a25919b727c6e438f8bddf36f10b0"><div class="ttname"><a href="group__ads1256__driver.html#ga9b6a25919b727c6e438f8bddf36f10b0">ADS1256_GetInputChannels</a></div><div class="ttdeci">void ADS1256_GetInputChannels(void)</div><div class="ttdoc">Retrieve the currently selected input channels. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01364">ADS1256_Driver.c:1364</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga7dee6663af668f862c4bca7c56d80f5e"><div class="ttname"><a href="group__ads1256__driver.html#ga7dee6663af668f862c4bca7c56d80f5e">ADS1256_GetMeasurement</a></div><div class="ttdeci">int32_t ADS1256_GetMeasurement(void)</div><div class="ttdoc">Retrieve the latest measurement code from the ADC. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00682">ADS1256_Driver.c:682</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gabd0d17a03fdddefb2d8cf04ad304a49d"><div class="ttname"><a href="group__ads1256__driver.html#gabd0d17a03fdddefb2d8cf04ad304a49d">ADS1256_SetPGASetting</a></div><div class="ttdeci">void ADS1256_SetPGASetting(ADS1256_PGA_t gain)</div><div class="ttdoc">Set the ADC PGA gain setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01474">ADS1256_Driver.c:1474</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42abc99c1ced898bb7b5d16bd6e73e8d2e1"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42abc99c1ced898bb7b5d16bd6e73e8d2e1">ADS1256_SELFCAL</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00500">ADS1256_Driver.h:500</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga4a1749dfc2cad3986a2f29cbe6e63b87"><div class="ttname"><a href="group__ads1256__driver.html#ga4a1749dfc2cad3986a2f29cbe6e63b87">ADS1256_GetSelfCalTime</a></div><div class="ttdeci">float ADS1256_GetSelfCalTime(void)</div><div class="ttdoc">Retrieves the total self calibration time. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00909">ADS1256_Driver.c:909</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gafb6c3c92ef11b050dfa33073e0347a4c"><div class="ttname"><a href="group__ads1256__driver.html#gafb6c3c92ef11b050dfa33073e0347a4c">ADS1256_GetInputBufferSetting</a></div><div class="ttdeci">ADS1256_BUFFER_t ADS1256_GetInputBufferSetting(void)</div><div class="ttdoc">Retrieves the current input buffer setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01310">ADS1256_Driver.c:1310</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gad8605a86bb12367efea3074b97dfa529"><div class="ttname"><a href="group__ads1256__driver.html#gad8605a86bb12367efea3074b97dfa529">ADS1256_ConvertRawValue</a></div><div class="ttdeci">int32_t ADS1256_ConvertRawValue(uint32_t value)</div><div class="ttdoc">Converts the raw output of the ADC into a signed integer type. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00891">ADS1256_Driver.c:891</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga3615e2e1ba70971dcdd5f7e54ffe5606ad87274f158f6a5534bb84cb4c75ac3e7"><div class="ttname"><a href="group__ads1256__driver.html#gga3615e2e1ba70971dcdd5f7e54ffe5606ad87274f158f6a5534bb84cb4c75ac3e7">ADS1256_MSB_FIRST</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00245">ADS1256_Driver.h:245</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea199864dc6828ab191e384581f7de2448">ADS1256_ADCON</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00458">ADS1256_Driver.h:458</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga9642423b95878836291bbf57102e92a6"><div class="ttname"><a href="group__ads1256__driver.html#ga9642423b95878836291bbf57102e92a6">ADS1256_PrintRegs</a></div><div class="ttdeci">void ADS1256_PrintRegs(void)</div><div class="ttdoc">Print all the local registers. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00324">ADS1256_Driver.c:324</a></div></div>
<div class="ttc" id="group__status__register_html_ga295221d00dc4ae777c591ffdbc7f8922"><div class="ttname"><a href="group__status__register.html#ga295221d00dc4ae777c591ffdbc7f8922">ADS1256_ORDER_BIT</a></div><div class="ttdeci">#define ADS1256_ORDER_BIT</div><div class="ttdoc">The data output order bit starting position in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00108">ADS1256_Driver.h:108</a></div></div>
<div class="ttc" id="group__status__register_html_ga39195cf60d4a91b0b61a5461ed1a5a67"><div class="ttname"><a href="group__status__register.html#ga39195cf60d4a91b0b61a5461ed1a5a67">ADS1256_DRDY_SPAN</a></div><div class="ttdeci">#define ADS1256_DRDY_SPAN</div><div class="ttdoc">The data ready bit count in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00078">ADS1256_Driver.h:78</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gad426414f0eab896faac18f0c6d4dbaa2"><div class="ttname"><a href="group__ads1256__driver.html#gad426414f0eab896faac18f0c6d4dbaa2">ADS1256_AlwayFetch</a></div><div class="ttdeci">void ADS1256_AlwayFetch(bool always)</div><div class="ttdoc">Selects remote register auto-fetch behavior. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01246">ADS1256_Driver.c:1246</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga0eecf15939442deb9f23a1f9758539f9"><div class="ttname"><a href="group__ads1256__driver.html#ga0eecf15939442deb9f23a1f9758539f9">ADS1256_SendBytes</a></div><div class="ttdeci">void ADS1256_SendBytes(uint8_t *data, const uint8_t n)</div><div class="ttdoc">Send an array of bytes over the SPI line. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___s_p_i___controller_8c_source.html#l00279">ADS1256_SPI_Controller.c:279</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga06c5d4c98c45514224e4f494b2618221"><div class="ttname"><a href="group__ads1256__driver.html#ga06c5d4c98c45514224e4f494b2618221">ADS1256_GetGainCalSetting</a></div><div class="ttdeci">uint32_t ADS1256_GetGainCalSetting(void)</div><div class="ttdoc">Retrieve the current gain calibration value. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01661">ADS1256_Driver.c:1661</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdeaa0f2a3e21e4efa92857623a7283cfdd1"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaa0f2a3e21e4efa92857623a7283cfdd1">ADS1256_FSC0</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00464">ADS1256_Driver.h:464</a></div></div>
<div class="ttc" id="_a_d_s1256___driver_8c_html_aaa23b199dae1b52d4b78b56328e5509b"><div class="ttname"><a href="_a_d_s1256___driver_8c.html#aaa23b199dae1b52d4b78b56328e5509b">ADS1256_REGISTERS_TOSTRING_HEADER</a></div><div class="ttdeci">#define ADS1256_REGISTERS_TOSTRING_HEADER</div><div class="ttdoc">Used as a header for each block of analog measurement printing to string. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00079">ADS1256_Driver.c:79</a></div></div>
<div class="ttc" id="group__adcon__register_html_ga331593eda0ade15ce934f8d2188e0f4f"><div class="ttname"><a href="group__adcon__register.html#ga331593eda0ade15ce934f8d2188e0f4f">ADS1256_PGA_BIT</a></div><div class="ttdeci">#define ADS1256_PGA_BIT</div><div class="ttdoc">The programmable gain amplifier setting bit starting position in the ADCON register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00169">ADS1256_Driver.h:169</a></div></div>
<div class="ttc" id="group__io__register_html_ga79e29004c3a9381caf716a834ad58426"><div class="ttname"><a href="group__io__register.html#ga79e29004c3a9381caf716a834ad58426">ADS1256_GPIO_DIR_OFFSET</a></div><div class="ttdeci">#define ADS1256_GPIO_DIR_OFFSET</div><div class="ttdoc">Offset in the IO register to the direction bits. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00194">ADS1256_Driver.h:194</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga4df06f2662792cc9eff4ac7f97e35026"><div class="ttname"><a href="group__ads1256__driver.html#ga4df06f2662792cc9eff4ac7f97e35026">ADS1256_GPIO_DIRECTION_t</a></div><div class="ttdeci">ADS1256_GPIO_DIRECTION_t</div><div class="ttdoc">GPIO direction enumeration. Defines the input and output states of the GPIO pins of the ADS1256...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00420">ADS1256_Driver.h:420</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga63ad5ddbb824fd07aedb6c0884db47eb"><div class="ttname"><a href="group__ads1256__driver.html#ga63ad5ddbb824fd07aedb6c0884db47eb">ADS1256_GetOffsetCalSetting</a></div><div class="ttdeci">uint32_t ADS1256_GetOffsetCalSetting(void)</div><div class="ttdoc">Retrieve the current offset calibration value. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01624">ADS1256_Driver.c:1624</a></div></div>
<div class="ttc" id="group__status__register_html_gae477a7ad4b56f4a0579a674f5ef44d26"><div class="ttname"><a href="group__status__register.html#gae477a7ad4b56f4a0579a674f5ef44d26">ADS1256_BUFFEN_SPAN</a></div><div class="ttdeci">#define ADS1256_BUFFEN_SPAN</div><div class="ttdoc">The analog buffer enable bit count in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00090">ADS1256_Driver.h:90</a></div></div>
<div class="ttc" id="_a_d_s1256___driver_8h_html"><div class="ttname"><a href="_a_d_s1256___driver_8h.html">ADS1256_Driver.h</a></div><div class="ttdoc">Header file for the ADS1256 ADC driver. </div></div>
<div class="ttc" id="group__ads1256__driver_html_ga020698e4651ad6159ff7805f0a933562"><div class="ttname"><a href="group__ads1256__driver.html#ga020698e4651ad6159ff7805f0a933562">IS_ADS1256_GPIO_VALUE</a></div><div class="ttdeci">#define IS_ADS1256_GPIO_VALUE(VAL)</div><div class="ttdoc">Checks that the specified value is a valid GPIO state. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00445">ADS1256_Driver.h:445</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdea2652bd9dbe69551c508a9459a46de864"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea2652bd9dbe69551c508a9459a46de864">ADS1256_MUX</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00457">ADS1256_Driver.h:457</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdea6f3879237c79faf51383e8a52dbecd58"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea6f3879237c79faf51383e8a52dbecd58">ADS1256_NREGS</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00467">ADS1256_Driver.h:467</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga5cb8add9c1b77b2cf87be526d6363d1c"><div class="ttname"><a href="group__ads1256__driver.html#ga5cb8add9c1b77b2cf87be526d6363d1c">ADS1256_GetSettlingTime</a></div><div class="ttdeci">float ADS1256_GetSettlingTime(void)</div><div class="ttdoc">Retrieves the settling time of the ADC. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01197">ADS1256_Driver.c:1197</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdeae03cf2e683ca72e093cbc79352b4d7ed"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeae03cf2e683ca72e093cbc79352b4d7ed">ADS1256_IO</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00460">ADS1256_Driver.h:460</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga7eac069c538033668b7baeca198def8fa20686f8f3555bdf3074706ea7a0dbf56"><div class="ttname"><a href="group__ads1256__driver.html#gga7eac069c538033668b7baeca198def8fa20686f8f3555bdf3074706ea7a0dbf56">ADS1256_AIN1</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00259">ADS1256_Driver.h:259</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gab8cdcd9e7ab992e068f8b008c138f4e1"><div class="ttname"><a href="group__ads1256__driver.html#gab8cdcd9e7ab992e068f8b008c138f4e1">ADS1256_GetPGASetting</a></div><div class="ttdeci">ADS1256_PGA_t ADS1256_GetPGASetting(void)</div><div class="ttdoc">Retrieve the ADC PGA gain setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01434">ADS1256_Driver.c:1434</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gacc11f35703f43c395edb1e56c93d707f"><div class="ttname"><a href="group__ads1256__driver.html#gacc11f35703f43c395edb1e56c93d707f">ADS1256_GetGPIODirection</a></div><div class="ttdeci">ADS1256_GPIO_DIRECTION_t ADS1256_GetGPIODirection(ADS1256_GPIO_t pin)</div><div class="ttdoc">Retrieve the GPIO direction setting of a pin. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01565">ADS1256_Driver.c:1565</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42a7ec76391f15bfc4dbc9f67f657793a8a"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a7ec76391f15bfc4dbc9f67f657793a8a">ADS1256_WAKEUP</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00494">ADS1256_Driver.h:494</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gaf09ce69ea32ea967d008d0a465929820"><div class="ttname"><a href="group__ads1256__driver.html#gaf09ce69ea32ea967d008d0a465929820">ADS1256_SPI_Init</a></div><div class="ttdeci">void ADS1256_SPI_Init(void)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___s_p_i___controller_8c_source.html#l00150">ADS1256_SPI_Controller.c:150</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga16aea61ac77485fb889c960e16b0ed6b"><div class="ttname"><a href="group__ads1256__driver.html#ga16aea61ac77485fb889c960e16b0ed6b">ADS1256_CalibrateSelf_Offset</a></div><div class="ttdeci">void ADS1256_CalibrateSelf_Offset(void)</div><div class="ttdoc">Performs a self offset calibration of the ADC. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00846">ADS1256_Driver.c:846</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga17864ca559c443a262068f0d19406113a1d47eab8dbc92c3879643572738ab3fb"><div class="ttname"><a href="group__ads1256__driver.html#gga17864ca559c443a262068f0d19406113a1d47eab8dbc92c3879643572738ab3fb">ADS1256_ACAL_DISABLED</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00236">ADS1256_Driver.h:236</a></div></div>
<div class="ttc" id="group__adcon__register_html_ga5c128ef483f3f73486edc0926cfdd489"><div class="ttname"><a href="group__adcon__register.html#ga5c128ef483f3f73486edc0926cfdd489">ADS1256_CO_BIT</a></div><div class="ttdeci">#define ADS1256_CO_BIT</div><div class="ttdoc">The clock out setting bit starting position in the ADCON register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00145">ADS1256_Driver.h:145</a></div></div>
<div class="ttc" id="group__adcon__register_html_gaca76a3e75786c24c21dcc1f8b95d3c8f"><div class="ttname"><a href="group__adcon__register.html#gaca76a3e75786c24c21dcc1f8b95d3c8f">ADS1256_CO_SPAN</a></div><div class="ttdeci">#define ADS1256_CO_SPAN</div><div class="ttdoc">The clock out setting bit count in the ADCON register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00151">ADS1256_Driver.h:151</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5"><div class="ttname"><a href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3f8ee6f9a6ee59517b45d2704741b0d5">ADS1256_PGAx2</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00333">ADS1256_Driver.h:333</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga6b5e19fd414526c448625765505d8b8c"><div class="ttname"><a href="group__ads1256__driver.html#ga6b5e19fd414526c448625765505d8b8c">IS_ADS1256_SENSOR_DETECT_SETTING</a></div><div class="ttdeci">#define IS_ADS1256_SENSOR_DETECT_SETTING(SEN)</div><div class="ttdoc">Checks that the specified value is a valid sensor detect current output. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00322">ADS1256_Driver.h:322</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731a7a94d4abfbc3f888640cc1301bba481c"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a7a94d4abfbc3f888640cc1301bba481c">ADS1256_SPS_60</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00371">ADS1256_Driver.h:371</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga12f71f8fc93fe63fb3c855ddd2070890ab96fff9524e97e03826453e744f85e92"><div class="ttname"><a href="group__ads1256__driver.html#gga12f71f8fc93fe63fb3c855ddd2070890ab96fff9524e97e03826453e744f85e92">ADS1256_BUFFER_DISABLED</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00227">ADS1256_Driver.h:227</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga4664ba6707817673019016b0b0d6668e"><div class="ttname"><a href="group__ads1256__driver.html#ga4664ba6707817673019016b0b0d6668e">ADS1256_Reset_By_Pin</a></div><div class="ttdeci">void ADS1256_Reset_By_Pin(void)</div><div class="ttdoc">Reset the ADS1256 ADC via its RESET pin. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00614">ADS1256_Driver.c:614</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga2d683909a58aa0617ee7c5d06d0a489fa916ced2e355d66e2d3a92b8c2a0b7ec0"><div class="ttname"><a href="group__ads1256__driver.html#gga2d683909a58aa0617ee7c5d06d0a489fa916ced2e355d66e2d3a92b8c2a0b7ec0">ADS1256_CLOCK_OUT_OFF</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00292">ADS1256_Driver.h:292</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gacf2f61cb43087ae7c270f00d24b27526"><div class="ttname"><a href="group__ads1256__driver.html#gacf2f61cb43087ae7c270f00d24b27526">ADS1256_GetDataRate</a></div><div class="ttdeci">ADS1256_SPS_t ADS1256_GetDataRate(void)</div><div class="ttdoc">Retrieve the ADC data rate (sample rate) setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01529">ADS1256_Driver.c:1529</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f"><div class="ttname"><a href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a3d71ca28a4b57bae10b35448e957e62f">ADS1256_PGAx1</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00332">ADS1256_Driver.h:332</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731af955d6f41a97fe05c19e33875b9f8179"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af955d6f41a97fe05c19e33875b9f8179">ADS1256_SPS_15000</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00364">ADS1256_Driver.h:364</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga587084017ba4b239ffb8d90376921c2caa73adb23173490c355e1f42cc097b62e"><div class="ttname"><a href="group__ads1256__driver.html#gga587084017ba4b239ffb8d90376921c2caa73adb23173490c355e1f42cc097b62e">ADS1256_GPIO_LOW</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00437">ADS1256_Driver.h:437</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gaf55f2ff09e67223f3e5e0a6eb69de98b"><div class="ttname"><a href="group__ads1256__driver.html#gaf55f2ff09e67223f3e5e0a6eb69de98b">ADS1256_GPIO_t</a></div><div class="ttdeci">ADS1256_GPIO_t</div><div class="ttdoc">GPIO pin enumeration. Defines the different GPIO pins of the ADS1256. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00409">ADS1256_Driver.h:409</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga7ce3f5d5b256eeeba15bd2ad17c1010a"><div class="ttname"><a href="group__ads1256__driver.html#ga7ce3f5d5b256eeeba15bd2ad17c1010a">ADS1256_GetSensorDetectCurrent</a></div><div class="ttdeci">ADS1256_SENSOR_DETECT_t ADS1256_GetSensorDetectCurrent(void)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01416">ADS1256_Driver.c:1416</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga4df06f2662792cc9eff4ac7f97e35026afeaaf398ab13211be0864d1532282e51"><div class="ttname"><a href="group__ads1256__driver.html#gga4df06f2662792cc9eff4ac7f97e35026afeaaf398ab13211be0864d1532282e51">ADS1256_GPIO_INPUT</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00422">ADS1256_Driver.h:422</a></div></div>
<div class="ttc" id="_tekdaqc___debug_8h_html"><div class="ttname"><a href="_tekdaqc___debug_8h.html">Tekdaqc_Debug.h</a></div><div class="ttdoc">Header file to define precompiler variables for debugging sections of code. </div></div>
<div class="ttc" id="group__tekdaqc__timers_html_ga5ec7c1ff1d0645d24d030f36382e9417"><div class="ttname"><a href="group__tekdaqc__timers.html#ga5ec7c1ff1d0645d24d030f36382e9417">Delay_us</a></div><div class="ttdeci">void Delay_us(uint64_t us)</div><div class="ttdoc">Blocking delay, measured in microseconds. </div><div class="ttdef"><b>Definition:</b> <a href="_tekdaqc___timers_8c_source.html#l00133">Tekdaqc_Timers.c:133</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga04cf21f06b462886045c4075782fdf13"><div class="ttname"><a href="group__ads1256__driver.html#ga04cf21f06b462886045c4075782fdf13">ADS1256_StringToPGA</a></div><div class="ttdeci">ADS1256_PGA_t ADS1256_StringToPGA(char *str)</div><div class="ttdoc">Convert a human readable string into the relevant ADS1256_PGA_t value. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00521">ADS1256_Driver.c:521</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga91d8582f9d5cb52b54fb801644e05e21"><div class="ttname"><a href="group__ads1256__driver.html#ga91d8582f9d5cb52b54fb801644e05e21">ADS1256_ReadData</a></div><div class="ttdeci">void ADS1256_ReadData(uint8_t *data)</div><div class="ttdoc">Start reading the 3-byte data. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00713">ADS1256_Driver.c:713</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga6f362fc42d375f4aec10bd2115dfd85d"><div class="ttname"><a href="group__ads1256__driver.html#ga6f362fc42d375f4aec10bd2115dfd85d">ADS1256_GetDataOutputBitOrder</a></div><div class="ttdeci">ADS1256_ORDER_t ADS1256_GetDataOutputBitOrder(void)</div><div class="ttdoc">Retrieves the current data output order. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01278">ADS1256_Driver.c:1278</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga420b194968282731c912be5ccad0d30c"><div class="ttname"><a href="group__ads1256__driver.html#ga420b194968282731c912be5ccad0d30c">ADS1256_SetOffsetCalSetting</a></div><div class="ttdeci">void ADS1256_SetOffsetCalSetting(uint8_t *value)</div><div class="ttdoc">Set the offset calibration value. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01645">ADS1256_Driver.c:1645</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga525f292542208f8309ee79c912b77334"><div class="ttname"><a href="group__ads1256__driver.html#ga525f292542208f8309ee79c912b77334">ADS1256_SCLK_LOW</a></div><div class="ttdeci">void ADS1256_SCLK_LOW(void)</div><div class="ttdoc">Send the SPI Clock pin low. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01892">ADS1256_Driver.c:1892</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gaa3102e98865ba4e72463676779cd62d4"><div class="ttname"><a href="group__ads1256__driver.html#gaa3102e98865ba4e72463676779cd62d4">ADS1256_SENSOR_DETECT_t</a></div><div class="ttdeci">ADS1256_SENSOR_DETECT_t</div><div class="ttdoc">Sensor detect current source setting enumeration. Defines the different possible current source outpu...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00311">ADS1256_Driver.h:311</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731ac08e0021f65ebc828e467da3713964ed"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ac08e0021f65ebc828e467da3713964ed">ADS1256_SPS_3750</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00366">ADS1256_Driver.h:366</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga3615e2e1ba70971dcdd5f7e54ffe5606"><div class="ttname"><a href="group__ads1256__driver.html#ga3615e2e1ba70971dcdd5f7e54ffe5606">ADS1256_ORDER_t</a></div><div class="ttdeci">ADS1256_ORDER_t</div><div class="ttdoc">Data output order flag enumeration. Defines the two possible states of the ADS1256 data output order ...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00244">ADS1256_Driver.h:244</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga0d74a1bb54e74bd1ef8af302471d3905"><div class="ttname"><a href="group__ads1256__driver.html#ga0d74a1bb54e74bd1ef8af302471d3905">ADS1256_SetInputBufferSetting</a></div><div class="ttdeci">void ADS1256_SetInputBufferSetting(ADS1256_BUFFER_t buffer)</div><div class="ttdoc">Sets the input buffer setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01347">ADS1256_Driver.c:1347</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gafa9381054942c98cb2be8881e86bc209"><div class="ttname"><a href="group__ads1256__driver.html#gafa9381054942c98cb2be8881e86bc209">ADS1256_IsDataReady</a></div><div class="ttdeci">bool ADS1256_IsDataReady(bool useCommand)</div><div class="ttdoc">Checks to see if valid data is ready. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00741">ADS1256_Driver.c:741</a></div></div>
<div class="ttc" id="_tekdaqc__config_8h_html"><div class="ttname"><a href="_tekdaqc__config_8h.html">Tekdaqc_config.h</a></div><div class="ttdoc">Header file for the configuring the Tekdaqc. </div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731a60cbd1927b566eafda96104ece8d7e70"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a60cbd1927b566eafda96104ece8d7e70">ADS1256_SPS_5</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00377">ADS1256_Driver.h:377</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga2bf7d5627d8645de8b27842a006653bd"><div class="ttname"><a href="group__ads1256__driver.html#ga2bf7d5627d8645de8b27842a006653bd">ADS1256_SetInputChannels</a></div><div class="ttdeci">void ADS1256_SetInputChannels(ADS1256_AIN_t pos, ADS1256_AIN_t neg)</div><div class="ttdoc">Set the currently selected input channels. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01378">ADS1256_Driver.c:1378</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731a610b2d5c532647c47eccfae4f38180c9"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a610b2d5c532647c47eccfae4f38180c9">ADS1256_SPS_100</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00370">ADS1256_Driver.h:370</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gab49754dd631e07c61fed6c41b18ad88e"><div class="ttname"><a href="group__ads1256__driver.html#gab49754dd631e07c61fed6c41b18ad88e">ADS1256_CalibrateSystem_Offset</a></div><div class="ttdeci">void ADS1256_CalibrateSystem_Offset(void)</div><div class="ttdoc">Performs a system offset calibration. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00873">ADS1256_Driver.c:873</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga12f71f8fc93fe63fb3c855ddd2070890a5e401084d351163377c60d8e4e2a50c1"><div class="ttname"><a href="group__ads1256__driver.html#gga12f71f8fc93fe63fb3c855ddd2070890a5e401084d351163377c60d8e4e2a50c1">ADS1256_BUFFER_ENABLED</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00228">ADS1256_Driver.h:228</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga17864ca559c443a262068f0d19406113"><div class="ttname"><a href="group__ads1256__driver.html#ga17864ca559c443a262068f0d19406113">ADS1256_ACAL_t</a></div><div class="ttdeci">ADS1256_ACAL_t</div><div class="ttdoc">Automatic calibration flag enumeration. Defines the two possible states of the ADS1256 automatic cali...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00235">ADS1256_Driver.h:235</a></div></div>
<div class="ttc" id="group__status__register_html_gaa07ca51df9b9ce477186cf92d331a59c"><div class="ttname"><a href="group__status__register.html#gaa07ca51df9b9ce477186cf92d331a59c">ADS1256_ORDER_SPAN</a></div><div class="ttdeci">#define ADS1256_ORDER_SPAN</div><div class="ttdoc">The data output order bit count in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00114">ADS1256_Driver.h:114</a></div></div>
<div class="ttc" id="group__status__register_html_ga94588026849071dfdf4bacbdbf24976a"><div class="ttname"><a href="group__status__register.html#ga94588026849071dfdf4bacbdbf24976a">ADS1256_ACAL_BIT</a></div><div class="ttdeci">#define ADS1256_ACAL_BIT</div><div class="ttdoc">The automatic calibration enable bit starting position in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00096">ADS1256_Driver.h:96</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga4131f935614bc1ea9eff4f0ec8b1cdfb"><div class="ttname"><a href="group__ads1256__driver.html#ga4131f935614bc1ea9eff4f0ec8b1cdfb">ADS1256_SetDataOutputBitOrder</a></div><div class="ttdeci">void ADS1256_SetDataOutputBitOrder(ADS1256_ORDER_t order)</div><div class="ttdoc">Sets the data output order. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01326">ADS1256_Driver.c:1326</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gab0437f81aad031aadf3e05dd5fe0a731"><div class="ttname"><a href="group__ads1256__driver.html#gab0437f81aad031aadf3e05dd5fe0a731">ADS1256_SPS_t</a></div><div class="ttdeci">ADS1256_SPS_t</div><div class="ttdoc">Data rate (samples per second) setting enumeration. Defines the different possible data rate (samples...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00362">ADS1256_Driver.h:362</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga96e7231f5e5efc15c39b81b21baf1b95"><div class="ttname"><a href="group__ads1256__driver.html#ga96e7231f5e5efc15c39b81b21baf1b95">ADS1256_CalibrateSelf_Gain</a></div><div class="ttdeci">void ADS1256_CalibrateSelf_Gain(void)</div><div class="ttdoc">Performs a self gain calibration of the ADC. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00833">ADS1256_Driver.c:833</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga7eac069c538033668b7baeca198def8fa47239a420bad562940da8a369ba7ef02"><div class="ttname"><a href="group__ads1256__driver.html#gga7eac069c538033668b7baeca198def8fa47239a420bad562940da8a369ba7ef02">ADS1256_AIN0</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00258">ADS1256_Driver.h:258</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga631498cd1b9e0302c8ceec6ad3094e03"><div class="ttname"><a href="group__ads1256__driver.html#ga631498cd1b9e0302c8ceec6ad3094e03">ADS1256_GPIO_To_CLK</a></div><div class="ttdeci">void ADS1256_GPIO_To_CLK(void)</div><div class="ttdoc">Switch the SPI clock pin to SPI control. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___s_p_i___controller_8c_source.html#l00221">ADS1256_SPI_Controller.c:221</a></div></div>
<div class="ttc" id="group__status__register_html_ga8836defa503977dda06238596f6bb8e3"><div class="ttname"><a href="group__status__register.html#ga8836defa503977dda06238596f6bb8e3">ADS1256_DRDY_BIT</a></div><div class="ttdeci">#define ADS1256_DRDY_BIT</div><div class="ttdoc">The data ready bit starting position in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00072">ADS1256_Driver.h:72</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731a968c2e2d2088b56c7983ea25d88ab095"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a968c2e2d2088b56c7983ea25d88ab095">ADS1256_SPS_10</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00376">ADS1256_Driver.h:376</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga59c2fb71d5fac95ab30f4c66c0e4a9e2"><div class="ttname"><a href="group__ads1256__driver.html#ga59c2fb71d5fac95ab30f4c66c0e4a9e2">ADS1256_StringFromPGA</a></div><div class="ttdeci">const char * ADS1256_StringFromPGA(ADS1256_PGA_t pga)</div><div class="ttdoc">Return the human readable string representation of the provided gain setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00414">ADS1256_Driver.c:414</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdea546b556453240d6fcf14f818575e4e00"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdea546b556453240d6fcf14f818575e4e00">ADS1256_FSC2</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00466">ADS1256_Driver.h:466</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga047a9418e182cce649f167169e3a72bf"><div class="ttname"><a href="group__ads1256__driver.html#ga047a9418e182cce649f167169e3a72bf">ADS1256_GetClockOutRate</a></div><div class="ttdeci">ADS1256_CLOCK_OUT_t ADS1256_GetClockOutRate(void)</div><div class="ttdoc">Retrieve the ADC clock out rate. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01399">ADS1256_Driver.c:1399</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga587084017ba4b239ffb8d90376921c2c"><div class="ttname"><a href="group__ads1256__driver.html#ga587084017ba4b239ffb8d90376921c2c">ADS1256_GPIO_STATUS_t</a></div><div class="ttdeci">ADS1256_GPIO_STATUS_t</div><div class="ttdoc">GPIO logic level enumeration. Defines the two logic states of the GPIO pins of the ADS1256...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00436">ADS1256_Driver.h:436</a></div></div>
<div class="ttc" id="group__adcon__register_html_ga7ccaedf1fc3255f7701cf9512d500a42"><div class="ttname"><a href="group__adcon__register.html#ga7ccaedf1fc3255f7701cf9512d500a42">ADS1256_SD_SPAN</a></div><div class="ttdeci">#define ADS1256_SD_SPAN</div><div class="ttdoc">The sensor detect current setting bit count in the ADCON register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00163">ADS1256_Driver.h:163</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95"><div class="ttname"><a href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701a9f7099b461faf079cb07e6bb2a011d95">ADS1256_PGAx8</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00335">ADS1256_Driver.h:335</a></div></div>
<div class="ttc" id="group__adcon__register_html_gae9ac3d875a51151679aa3bb5de911286"><div class="ttname"><a href="group__adcon__register.html#gae9ac3d875a51151679aa3bb5de911286">ADS1256_SD_BIT</a></div><div class="ttdeci">#define ADS1256_SD_BIT</div><div class="ttdoc">The sensor detect current setting bit starting position in the ADCON register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00157">ADS1256_Driver.h:157</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga72de73cf9585121dd65895c6addf16ff"><div class="ttname"><a href="group__ads1256__driver.html#ga72de73cf9585121dd65895c6addf16ff">ADS1256_CalibrateSelf</a></div><div class="ttdeci">void ADS1256_CalibrateSelf(void)</div><div class="ttdoc">Performs a complete self calibration of the ADC. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00820">ADS1256_Driver.c:820</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga03b6f97db2c7988af4c239575cc88fde"><div class="ttname"><a href="group__ads1256__driver.html#ga03b6f97db2c7988af4c239575cc88fde">ADS1256_Register_t</a></div><div class="ttdeci">ADS1256_Register_t</div><div class="ttdoc">ADS1256 register enumeration. Defines the addresses of the 11 control registers of the ADS1256 ADC...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00455">ADS1256_Driver.h:455</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga0c9c039ac03ad1280102b1f05c056071"><div class="ttname"><a href="group__ads1256__driver.html#ga0c9c039ac03ad1280102b1f05c056071">ADS1256_CS_HIGH</a></div><div class="ttdeci">#define ADS1256_CS_HIGH()</div><div class="ttdoc">De-select ADS1256: Chip Select pin high. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___s_p_i___controller_8h_source.html#l00063">ADS1256_SPI_Controller.h:63</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731a12d8d1323c2628fe27a17765b06d0af0"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a12d8d1323c2628fe27a17765b06d0af0">ADS1256_SPS_1000</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00368">ADS1256_Driver.h:368</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga7dbd4e23a723295a60adc8a7a97b9c5a"><div class="ttname"><a href="group__ads1256__driver.html#ga7dbd4e23a723295a60adc8a7a97b9c5a">ADS1256_SetAutoCalSetting</a></div><div class="ttdeci">void ADS1256_SetAutoCalSetting(ADS1256_ACAL_t acal)</div><div class="ttdoc">Sets the auto calibration setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01337">ADS1256_Driver.c:1337</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggaf437774eb0db277a2916b6322213b449a0487f4550f3178d69a29cde93e86918c"><div class="ttname"><a href="group__ads1256__driver.html#ggaf437774eb0db277a2916b6322213b449a0487f4550f3178d69a29cde93e86918c">ADS1256_DATA_READY</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00218">ADS1256_Driver.h:218</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42a15d3f34090137e08b2a38765214a1153"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a15d3f34090137e08b2a38765214a1153">ADS1256_WREG</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00499">ADS1256_Driver.h:499</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga2d683909a58aa0617ee7c5d06d0a489f"><div class="ttname"><a href="group__ads1256__driver.html#ga2d683909a58aa0617ee7c5d06d0a489f">ADS1256_CLOCK_OUT_t</a></div><div class="ttdeci">ADS1256_CLOCK_OUT_t</div><div class="ttdoc">Clock out frequency setting enumeration. Defines the different possible clock out rates of the ADS125...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00291">ADS1256_Driver.h:291</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga8354e6ff9be09b89afcac3c5fcbd3083"><div class="ttname"><a href="group__ads1256__driver.html#ga8354e6ff9be09b89afcac3c5fcbd3083">ADS1256_SetClockOutRate</a></div><div class="ttdeci">void ADS1256_SetClockOutRate(ADS1256_CLOCK_OUT_t clock)</div><div class="ttdoc">Set the ADC clock out rate. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01451">ADS1256_Driver.c:1451</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gabfd8ef639770cdb94388e1b63da1b0ba"><div class="ttname"><a href="group__ads1256__driver.html#gabfd8ef639770cdb94388e1b63da1b0ba">ADS1256_StringFromSPS</a></div><div class="ttdeci">const char * ADS1256_StringFromSPS(ADS1256_SPS_t sps)</div><div class="ttdoc">Return the human readable string representation of the provided data rate. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00366">ADS1256_Driver.c:366</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga1c25b603705f67cccde59e406b1c4c07"><div class="ttname"><a href="group__ads1256__driver.html#ga1c25b603705f67cccde59e406b1c4c07">ADS1256_Reset_By_Clock</a></div><div class="ttdeci">void ADS1256_Reset_By_Clock(void)</div><div class="ttdoc">Reset the ADS1256 ADC via clock command. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00586">ADS1256_Driver.c:586</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga33886a7717bd57bc4c1adc81dd78f4d5"><div class="ttname"><a href="group__ads1256__driver.html#ga33886a7717bd57bc4c1adc81dd78f4d5">IS_ADS1256_CLOCKOUT_SETTING</a></div><div class="ttdeci">#define IS_ADS1256_CLOCKOUT_SETTING(CLK)</div><div class="ttdoc">Checks that the specified value is a valid clock out rate. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00302">ADS1256_Driver.h:302</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdeaf24fb3090a15c8ec37e8920054076b33"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaf24fb3090a15c8ec37e8920054076b33">ADS1256_FSC1</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00465">ADS1256_Driver.h:465</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gae179dd8d2feace96c296cdff466225dc"><div class="ttname"><a href="group__ads1256__driver.html#gae179dd8d2feace96c296cdff466225dc">ADS1256_SetSensorDetectCurrent</a></div><div class="ttdeci">void ADS1256_SetSensorDetectCurrent(ADS1256_SENSOR_DETECT_t current)</div><div class="ttdoc">Set the ADC sensor detect current output. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01462">ADS1256_Driver.c:1462</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42ac774622b486ccde765515c2de6b45bda"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42ac774622b486ccde765515c2de6b45bda">ADS1256_STANDBY</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00506">ADS1256_Driver.h:506</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga7eac069c538033668b7baeca198def8f"><div class="ttname"><a href="group__ads1256__driver.html#ga7eac069c538033668b7baeca198def8f">ADS1256_AIN_t</a></div><div class="ttdeci">ADS1256_AIN_t</div><div class="ttdoc">Analog input channel enumeration. Defines the register values for each analog input selectable by the...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00257">ADS1256_Driver.h:257</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga655fb9a3125b65a0275bab57496008d3"><div class="ttname"><a href="group__ads1256__driver.html#ga655fb9a3125b65a0275bab57496008d3">IS_ADS1256_AIN_SETTING</a></div><div class="ttdeci">#define IS_ADS1256_AIN_SETTING(AIN)</div><div class="ttdoc">Checks that the specified value is a valid analog input channel. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00273">ADS1256_Driver.h:273</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga429559f049274cd24a6be2b20fd82973"><div class="ttname"><a href="group__ads1256__driver.html#ga429559f049274cd24a6be2b20fd82973">ADS1256_GetSystemGainCalTime</a></div><div class="ttdeci">float ADS1256_GetSystemGainCalTime(void)</div><div class="ttdoc">Retrieves the total system calibration time. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01152">ADS1256_Driver.c:1152</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga853d2d710efae91bb12c6cb17d562459"><div class="ttname"><a href="group__ads1256__driver.html#ga853d2d710efae91bb12c6cb17d562459">ADS1256_GetGainMultiplier</a></div><div class="ttdeci">int32_t ADS1256_GetGainMultiplier(ADS1256_PGA_t gain)</div><div class="ttdoc">Retrieve the multiplier for a specific PGA setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01487">ADS1256_Driver.c:1487</a></div></div>
<div class="ttc" id="group__status__register_html_ga4b89c536e185cfdbd9fa248a3e3772b7"><div class="ttname"><a href="group__status__register.html#ga4b89c536e185cfdbd9fa248a3e3772b7">ADS1256_ID_SPAN</a></div><div class="ttdeci">#define ADS1256_ID_SPAN</div><div class="ttdoc">The factory programmed ID bit count in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00126">ADS1256_Driver.h:126</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731a0f9109a1a40838123ccd55e1af90a3e6"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a0f9109a1a40838123ccd55e1af90a3e6">ADS1256_SPS_25</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00374">ADS1256_Driver.h:374</a></div></div>
<div class="ttc" id="group__status__register_html_ga2cbdb7cbaac91a12c2818e87b97a4906"><div class="ttname"><a href="group__status__register.html#ga2cbdb7cbaac91a12c2818e87b97a4906">ADS1256_BUFFEN_BIT</a></div><div class="ttdeci">#define ADS1256_BUFFEN_BIT</div><div class="ttdoc">The analog buffer enable bit starting position in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00084">ADS1256_Driver.h:84</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42af0834ed9ad198db005df6fe8508c4c83"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42af0834ed9ad198db005df6fe8508c4c83">ADS1256_SELFGCAL</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00502">ADS1256_Driver.h:502</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731adac392298502254c3d10c687fa20e230"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731adac392298502254c3d10c687fa20e230">ADS1256_SPS_2_5</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00378">ADS1256_Driver.h:378</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga817dc23392ce56ae255cb3238d796b60"><div class="ttname"><a href="group__ads1256__driver.html#ga817dc23392ce56ae255cb3238d796b60">ADS1256_Init</a></div><div class="ttdeci">void ADS1256_Init(void)</div><div class="ttdoc">Initialize the ADS1256 ADC Driver. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00241">ADS1256_Driver.c:241</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gafbb63ded07f35a486351c82902a33b8c"><div class="ttname"><a href="group__ads1256__driver.html#gafbb63ded07f35a486351c82902a33b8c">IS_ADS1256_PGA_SETTING</a></div><div class="ttdeci">#define IS_ADS1256_PGA_SETTING(PGA)</div><div class="ttdoc">Checks that the specified value is a valid gain setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00346">ADS1256_Driver.h:346</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42aa07436d08b9a5a260db9d8c1107a5af9"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42aa07436d08b9a5a260db9d8c1107a5af9">ADS1256_SYSGCAL</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00504">ADS1256_Driver.h:504</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga16dbb214bb63f6051170ee4f8964beb6"><div class="ttname"><a href="group__ads1256__driver.html#ga16dbb214bb63f6051170ee4f8964beb6">ADS1256_ResetAndReprogram</a></div><div class="ttdeci">void ADS1256_ResetAndReprogram(void)</div><div class="ttdoc">Performs a complete reset of the ADS1256 and restores its state. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00644">ADS1256_Driver.c:644</a></div></div>
<div class="ttc" id="group__io__register_html_gaae5e18a5051bc2b7c8f7ff4237edae2a"><div class="ttname"><a href="group__io__register.html#gaae5e18a5051bc2b7c8f7ff4237edae2a">ADS1256_GPIO_BIT_SPAN</a></div><div class="ttdeci">#define ADS1256_GPIO_BIT_SPAN</div><div class="ttdoc">The bit count for one GPIO pin int the IO register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00200">ADS1256_Driver.h:200</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731ae658af6aeb6976e4333295abe9cd2bfe"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731ae658af6aeb6976e4333295abe9cd2bfe">ADS1256_SPS_500</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00369">ADS1256_Driver.h:369</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788"><div class="ttname"><a href="group__ads1256__driver.html#ggace2e231df7cd3598eb26d5ff51171701aec68ef5e63b72eebbaf8411c8570a788">ADS1256_PGAx32</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00337">ADS1256_Driver.h:337</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731af12dc4b35be49d560742916582e6176c"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af12dc4b35be49d560742916582e6176c">ADS1256_SPS_2000</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00367">ADS1256_Driver.h:367</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga3a4dac1ff9bffcccbc561853a9598554"><div class="ttname"><a href="group__ads1256__driver.html#ga3a4dac1ff9bffcccbc561853a9598554">ADS1256_GetAutoCalSetting</a></div><div class="ttdeci">ADS1256_ACAL_t ADS1256_GetAutoCalSetting(void)</div><div class="ttdoc">Retrieves the current auto calibration setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01294">ADS1256_Driver.c:1294</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gafdd4555dcde566f72adf2d9d51f4a883"><div class="ttname"><a href="group__ads1256__driver.html#gafdd4555dcde566f72adf2d9d51f4a883">ADS1256_Reset_By_Command</a></div><div class="ttdeci">void ADS1256_Reset_By_Command(void)</div><div class="ttdoc">Reset the ADS1256 ADC via SPI command. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00571">ADS1256_Driver.c:571</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga2388b60ca886620f0daba1efc69c940a"><div class="ttname"><a href="group__ads1256__driver.html#ga2388b60ca886620f0daba1efc69c940a">ADS1256_Wakeup</a></div><div class="ttdeci">void ADS1256_Wakeup(void)</div><div class="ttdoc">Wakeup the ADC from SYNC/PWDN. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00787">ADS1256_Driver.c:787</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731a04ee81dece7d46e4d4db5ed37f358b0d"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731a04ee81dece7d46e4d4db5ed37f358b0d">ADS1256_SPS_7500</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00365">ADS1256_Driver.h:365</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga13b51a0fb626ff6f592fc7ce425e8046"><div class="ttname"><a href="group__ads1256__driver.html#ga13b51a0fb626ff6f592fc7ce425e8046">ADS1256_SCLK_HIGH</a></div><div class="ttdeci">void ADS1256_SCLK_HIGH(void)</div><div class="ttdoc">Send the SPI Clock pin high. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01902">ADS1256_Driver.c:1902</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gaa44ba74c5036ac42b24ce84eafaf56f2"><div class="ttname"><a href="group__ads1256__driver.html#gaa44ba74c5036ac42b24ce84eafaf56f2">ADS1256_RequestMeasurement</a></div><div class="ttdeci">void ADS1256_RequestMeasurement(void)</div><div class="ttdoc">Initiate a measurement. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00703">ADS1256_Driver.c:703</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga81371e39460504d1badd6291ef5ba2f7"><div class="ttname"><a href="group__ads1256__driver.html#ga81371e39460504d1badd6291ef5ba2f7">ADS1256_SendByte</a></div><div class="ttdeci">uint8_t ADS1256_SendByte(uint8_t data)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___s_p_i___controller_8c_source.html#l00255">ADS1256_SPI_Controller.c:255</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42a364c3ff9b43a6bd1a5bc716ee2327e8b"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a364c3ff9b43a6bd1a5bc716ee2327e8b">ADS1256_SYSOCAL</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00503">ADS1256_Driver.h:503</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga3a68db63bde582e77d1cad0e86e07922"><div class="ttname"><a href="group__ads1256__driver.html#ga3a68db63bde582e77d1cad0e86e07922">ADS1256_CLK_To_GPIO</a></div><div class="ttdeci">void ADS1256_CLK_To_GPIO(void)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___s_p_i___controller_8c_source.html#l00200">ADS1256_SPI_Controller.c:200</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga87d92ada1f9826aabe9e4b330e9edbef"><div class="ttname"><a href="group__ads1256__driver.html#ga87d92ada1f9826aabe9e4b330e9edbef">ADS1256_SetGainCalSetting</a></div><div class="ttdeci">void ADS1256_SetGainCalSetting(uint8_t *value)</div><div class="ttdoc">Set the gain calibration value. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01682">ADS1256_Driver.c:1682</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gacea1f1adb429508088a4a32029f90d00"><div class="ttname"><a href="group__ads1256__driver.html#gacea1f1adb429508088a4a32029f90d00">ADS1256_SetGPIODirection</a></div><div class="ttdeci">void ADS1256_SetGPIODirection(ADS1256_GPIO_t pin, ADS1256_GPIO_DIRECTION_t direction)</div><div class="ttdoc">Set the GPIO direction setting of a pin. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01593">ADS1256_Driver.c:1593</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga2628d1ea4f1436c89584bcc47baf79ef"><div class="ttname"><a href="group__ads1256__driver.html#ga2628d1ea4f1436c89584bcc47baf79ef">ADS1256_GetOffsetCalTime</a></div><div class="ttdeci">float ADS1256_GetOffsetCalTime(void)</div><div class="ttdoc">Retrieves the self offset calibration time. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01021">ADS1256_Driver.c:1021</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga458c5bdb28d0e87e28cdaa9cfcd5f429"><div class="ttname"><a href="group__ads1256__driver.html#ga458c5bdb28d0e87e28cdaa9cfcd5f429">ADS1256_WaitUntilDataReady</a></div><div class="ttdeci">void ADS1256_WaitUntilDataReady(bool useCommand)</div><div class="ttdoc">Wait in a loop until data is ready. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00728">ADS1256_Driver.c:728</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gacbbff85197a622b07cfb2bf47b57c29b"><div class="ttname"><a href="group__ads1256__driver.html#gacbbff85197a622b07cfb2bf47b57c29b">ADS1256_RegistersToString</a></div><div class="ttdeci">void ADS1256_RegistersToString(void)</div><div class="ttdoc">Print all the local registers to a string. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00338">ADS1256_Driver.c:338</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdeaf07570553a6f796ef337e5075dc30767"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaf07570553a6f796ef337e5075dc30767">ADS1256_OFC2</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00463">ADS1256_Driver.h:463</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731af00f11dbdf6bc388f20b6ee3b6e4bec3"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731af00f11dbdf6bc388f20b6ee3b6e4bec3">ADS1256_SPS_30</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00373">ADS1256_Driver.h:373</a></div></div>
<div class="ttc" id="group__status__register_html_gacccdeffab4e1942cec3794851ef228c7"><div class="ttname"><a href="group__status__register.html#gacccdeffab4e1942cec3794851ef228c7">ADS1256_ACAL_SPAN</a></div><div class="ttdeci">#define ADS1256_ACAL_SPAN</div><div class="ttdoc">The automatic calibration enable bit count in the STATUS register. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00102">ADS1256_Driver.h:102</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gaec26aa231ee327bf65220eee6f779b81"><div class="ttname"><a href="group__ads1256__driver.html#gaec26aa231ee327bf65220eee6f779b81">ADS1256_GetFactoryProgrammedID</a></div><div class="ttdeci">uint8_t ADS1256_GetFactoryProgrammedID(void)</div><div class="ttdoc">Retrieves the factory programed ID of the ADC. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01262">ADS1256_Driver.c:1262</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42aa6ae2f4d183376bc577810a320dbb227"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42aa6ae2f4d183376bc577810a320dbb227">ADS1256_SELFOCAL</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00501">ADS1256_Driver.h:501</a></div></div>
<div class="ttc" id="_a_d_s1256___driver_8c_html_a09f71f7cdf36c3dee470ee38edc8431e"><div class="ttname"><a href="_a_d_s1256___driver_8c.html#a09f71f7cdf36c3dee470ee38edc8431e">ADS1256_REGISTERS_DEBUG_FORMATTER</a></div><div class="ttdeci">#define ADS1256_REGISTERS_DEBUG_FORMATTER</div><div class="ttdoc">Used as the format string for printing the ADS1256 registers to a string. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00072">ADS1256_Driver.c:72</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga14de02499be3d1dae8497b4e048b9568"><div class="ttname"><a href="group__ads1256__driver.html#ga14de02499be3d1dae8497b4e048b9568">ADS1256_SetDataRate</a></div><div class="ttdeci">void ADS1256_SetDataRate(ADS1256_SPS_t sps)</div><div class="ttdoc">Set the ADC data rate (sample rate) setting. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01547">ADS1256_Driver.c:1547</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga55a9f5e79ef35937961a7ec254558010"><div class="ttname"><a href="group__ads1256__driver.html#ga55a9f5e79ef35937961a7ec254558010">IS_ADS1256_REGISTER_COMMAND</a></div><div class="ttdeci">#define IS_ADS1256_REGISTER_COMMAND(CMD)</div><div class="ttdoc">Checks that the specified value is a special register command of the ADS1256. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00534">ADS1256_Driver.h:534</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gga03b6f97db2c7988af4c239575cc88fdeaeb4092ff7d4d1de90200d3555a6e2c6c"><div class="ttname"><a href="group__ads1256__driver.html#gga03b6f97db2c7988af4c239575cc88fdeaeb4092ff7d4d1de90200d3555a6e2c6c">ADS1256_OFC0</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00461">ADS1256_Driver.h:461</a></div></div>
<div class="ttc" id="_tekdaqc___timers_8h_html"><div class="ttname"><a href="_tekdaqc___timers_8h.html">Tekdaqc_Timers.h</a></div><div class="ttdoc">Header file for the various timers used by the Tekdaqc. </div></div>
<div class="ttc" id="group__ads1256__driver_html_gac39cc4f0a18e9f7ce3f915d5b5050d94"><div class="ttname"><a href="group__ads1256__driver.html#gac39cc4f0a18e9f7ce3f915d5b5050d94">ADS1256_StringToBuffer</a></div><div class="ttdeci">ADS1256_BUFFER_t ADS1256_StringToBuffer(char *str)</div><div class="ttdoc">Convert a human readable string into the relevant ADS1256_BUFFER_t value. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00460">ADS1256_Driver.c:460</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gae2f1be4b151cfc9dfeede38a79764dff"><div class="ttname"><a href="group__ads1256__driver.html#gae2f1be4b151cfc9dfeede38a79764dff">ADS1256_StringToDataRate</a></div><div class="ttdeci">ADS1256_SPS_t ADS1256_StringToDataRate(char *str)</div><div class="ttdoc">Convert a human readable string into the relevant ADS1256_SPS_t value. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00474">ADS1256_Driver.c:474</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_gac1a6ea86db094b51ec478098738353b4"><div class="ttname"><a href="group__ads1256__driver.html#gac1a6ea86db094b51ec478098738353b4">ADS1256_StatePins_Init</a></div><div class="ttdeci">void ADS1256_StatePins_Init(void)</div><div class="ttdoc">Initialize the state pins of the ADC Driver. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00255">ADS1256_Driver.c:255</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga612ca0b8927aa0580401813ee278348b"><div class="ttname"><a href="group__ads1256__driver.html#ga612ca0b8927aa0580401813ee278348b">ADS1256_Sync</a></div><div class="ttdeci">void ADS1256_Sync(bool useCommand)</div><div class="ttdoc">Activate the SYNC feature of the ADC. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00768">ADS1256_Driver.c:768</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga46a14d9bcba054e6b6db5b4f8f0bf895"><div class="ttname"><a href="group__ads1256__driver.html#ga46a14d9bcba054e6b6db5b4f8f0bf895">ADS1256_CalibrateSystem_Gain</a></div><div class="ttdeci">void ADS1256_CalibrateSystem_Gain(void)</div><div class="ttdoc">Performs a system gain calibration. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00860">ADS1256_Driver.c:860</a></div></div>
<div class="ttc" id="_a_d_s1256___driver_8c_html_a04429776ba95839668cd3af623650e87"><div class="ttname"><a href="_a_d_s1256___driver_8c.html#a04429776ba95839668cd3af623650e87">ADS1256_NEGATIVE_FLAG</a></div><div class="ttdeci">#define ADS1256_NEGATIVE_FLAG</div><div class="ttdoc">Used to identify if a 24 bit unsigned int stored in a 32 bit unsigned int represents 2&#39;s compliment n...</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l00051">ADS1256_Driver.c:51</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ga041017c82a9411b72436c29667e98960"><div class="ttname"><a href="group__ads1256__driver.html#ga041017c82a9411b72436c29667e98960">ADS1256_GetSelfGainCalTime</a></div><div class="ttdeci">float ADS1256_GetSelfGainCalTime(void)</div><div class="ttdoc">Retrieves the self gain calibration time. </div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8c_source.html#l01066">ADS1256_Driver.c:1066</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggadb203fb3b246881a33160b5b25822d42a5d52692a6ccf9bb846ba1844057243c7"><div class="ttname"><a href="group__ads1256__driver.html#ggadb203fb3b246881a33160b5b25822d42a5d52692a6ccf9bb846ba1844057243c7">ADS1256_RESET</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00507">ADS1256_Driver.h:507</a></div></div>
<div class="ttc" id="group__ads1256__driver_html_ggab0437f81aad031aadf3e05dd5fe0a731acebddb9fec5c26050c0f10760593c7b8"><div class="ttname"><a href="group__ads1256__driver.html#ggab0437f81aad031aadf3e05dd5fe0a731acebddb9fec5c26050c0f10760593c7b8">ADS1256_SPS_15</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_s1256___driver_8h_source.html#l00375">ADS1256_Driver.h:375</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_da411aab950102a7c87084f4501853eb.html">TekDAQC_Libraries_Firmware</a></li><li class="navelem"><a class="el" href="dir_802ae1d07bfa9b99d65804b276995b48.html">src</a></li><li class="navelem"><a class="el" href="_a_d_s1256___driver_8c.html">ADS1256_Driver.c</a></li>
    <li class="footer">Generated on Mon Jul 28 2014 23:42:39 for Tekdaqc Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
